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