More bugfixing
This commit is contained in:
parent
30b3eb16c0
commit
bcaf6006bf
@ -7,24 +7,28 @@ function settings_db_open() {
|
||||
return db;
|
||||
}
|
||||
|
||||
function checkforold() {
|
||||
function dropTable() {
|
||||
//tx.executeSql("DROP TABLE IF EXISTS old_channels");
|
||||
db = settings_db_open();
|
||||
try {
|
||||
db.transaction(function(tx)
|
||||
{
|
||||
var rs = tx.executeSql('SELECT * FROM channels');
|
||||
// console.log("OLD DATABSE TABLE EXISTS")
|
||||
});
|
||||
db.transaction(
|
||||
function(tx) {
|
||||
tx.executeSql("DROP TABLE IF EXISTS settings");
|
||||
tx.executeSql("DROP TABLE IF EXISTS stations");
|
||||
tx.executeSql("DROP TABLE IF EXISTS countries");
|
||||
tx.executeSql("DROP TABLE IF EXISTS tags");
|
||||
}
|
||||
);
|
||||
}
|
||||
catch(a)
|
||||
{
|
||||
// console.log("NO OLD DATABASE")
|
||||
console.log("drop failed: "+a)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
function init() {
|
||||
db = settings_db_open();
|
||||
//checkforold()
|
||||
try {
|
||||
db.transaction(
|
||||
function(tx) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
Page {
|
||||
Flickable {
|
||||
id: flick
|
||||
@ -35,17 +36,6 @@ Page {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width-70
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("AllRadio is an internet radio station player")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignHCenter
|
||||
height: 200
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ Page {
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
radioPlayer.playlistIndex = index
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -237,7 +237,7 @@ Page {
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -303,7 +303,7 @@ Page {
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -344,7 +344,7 @@ Page {
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -381,7 +381,7 @@ Page {
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ Page {
|
||||
|
||||
console.log("Index: "+index)
|
||||
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
function updateFav() {
|
||||
|
@ -53,7 +53,7 @@ Page {
|
||||
radioPlayer._favorite = model.favorite ? true : false
|
||||
radioPlayer.playlistIndex = favoriteView.currentIndex
|
||||
//pageStack.push("RadioPlayerPage.qml")
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
function updateHist() {
|
||||
|
@ -208,7 +208,7 @@ Page {
|
||||
//radioPlayer._favorite = model.favorite ? true : false
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
// pageStack.push("RadioPlayerPage.qml")
|
||||
}
|
||||
} else radioPlayer.resumeStream()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
import "../helpers/db.js" as Favorites
|
||||
|
||||
Page {
|
||||
Flickable {
|
||||
id: flick
|
||||
@ -27,13 +29,27 @@ Page {
|
||||
Label {
|
||||
width: parent.width-70
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("Working on it.....")
|
||||
text: qsTr("Working on more settings.....")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignHCenter
|
||||
height: 200
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
Label {
|
||||
width: parent.width-70
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
text: qsTr("WARNING! THis is for debugging or corrupt database. Only delete db if it is not working!!!")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Delete DB")
|
||||
onClicked: Favorites.dropTable()
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,6 @@
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>AboutPage</name>
|
||||
<message>
|
||||
<source>AllRadio is an internet radio station player</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>License: GPLv2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -1138,7 +1134,15 @@
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
<message>
|
||||
<source>Working on it.....</source>
|
||||
<source>WARNING! THis is for debugging or corrupt database. Only delete db if it is not working!!!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Working on more settings.....</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete DB</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -3,10 +3,6 @@
|
||||
<TS version="2.1" language="sv_SE" sourcelanguage="en">
|
||||
<context>
|
||||
<name>AboutPage</name>
|
||||
<message>
|
||||
<source>AllRadio is an internet radio station player</source>
|
||||
<translation>AllRadio är en internet radio spelare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>License: GPLv2</source>
|
||||
<translation>Licens: GPLv2</translation>
|
||||
@ -1138,7 +1134,15 @@
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
<message>
|
||||
<source>Working on it.....</source>
|
||||
<source>WARNING! THis is for debugging or corrupt database. Only delete db if it is not working!!!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Working on more settings.....</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete DB</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
Loading…
x
Reference in New Issue
Block a user