Cleainging up, bug hunting and optimizing
This commit is contained in:
@@ -35,55 +35,6 @@ Page {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
/* Rectangle{
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#333333" }
|
||||
GradientStop { position: 1.0; color: "#777777" }
|
||||
}
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
height: 3
|
||||
width: parent.width-64
|
||||
}
|
||||
|
||||
Label {
|
||||
width: 360
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
text: "Created by llelectronics"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignHCenter
|
||||
}
|
||||
Repeater{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
//model: credits
|
||||
Label {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: title
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#333333" }
|
||||
GradientStop { position: 1.0; color: "#777777" }
|
||||
}
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
height: 3
|
||||
width: parent.width-64
|
||||
}
|
||||
|
||||
Button {
|
||||
id: homepage
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "<a href=\"https://github.com/llelectronics/webcat\">Sourcecode on Github</a>"
|
||||
onClicked: {
|
||||
mainWindow.openNewTab('page-'+salt(), "https://github.com/llelectronics/webcat", false);
|
||||
}
|
||||
} */
|
||||
|
||||
Label {
|
||||
width: parent.width-70
|
||||
|
||||
+42
-50
@@ -43,30 +43,21 @@ Page {
|
||||
onVisibleChanged: if (visible) reloadDbData()
|
||||
|
||||
PullDownMenu {
|
||||
MenuItem {
|
||||
text: qsTr("About")
|
||||
onClicked: pageStack.push("AboutPage.qml")
|
||||
MenuItem {
|
||||
text: qsTr("About")
|
||||
onClicked: pageStack.push("AboutPage.qml")
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Settings")
|
||||
onClicked: pageStack.push("SettingsPage.qml")
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Sleep timer")
|
||||
onClicked: {
|
||||
pageStack.push("SleepTimerPage.qml")
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Settings")
|
||||
onClicked: pageStack.push("SettingsPage.qml")
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Sleep timer")
|
||||
onClicked: {
|
||||
pageStack.push("SleepTimerPage.qml")
|
||||
}
|
||||
|
||||
/* var dialog = pageStack.push("Sailfish.Silica.TimePickerDialog", {
|
||||
hour: 0,
|
||||
minute: 30,
|
||||
hourMode: DateTime.TwentyFourHours
|
||||
})
|
||||
dialog.accepted.connect(function() {
|
||||
})
|
||||
} */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: mainColumn
|
||||
@@ -96,6 +87,7 @@ Page {
|
||||
smooth: true
|
||||
source: "../images/community.png"
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
anchors.fill: logo
|
||||
source: logo
|
||||
@@ -178,11 +170,11 @@ Page {
|
||||
height: Theme.itemSizeHuge * 1.35
|
||||
width: page.width
|
||||
cellHeight: height
|
||||
cellWidth: cellHeight * 0.75//Theme.itemSizeHuge + Theme.itemSizeMedium * 2
|
||||
cellWidth: cellHeight * 0.75
|
||||
flow: GridView.TopToBottom
|
||||
snapMode: SlideshowView.NoSnap
|
||||
layoutDirection: Qt.LeftToRight
|
||||
visible: favorites.count > 0//radioBrowser.getCountryName(_country) || playedCountries.count > 0 ? true : false
|
||||
visible: favorites.count > 0
|
||||
|
||||
model: favorites
|
||||
|
||||
@@ -191,21 +183,18 @@ Page {
|
||||
|
||||
onClicked: {
|
||||
if (model.url_resolved !== radioPlayer._url_resolved) {
|
||||
radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!?
|
||||
radioPlayer._favicon = model.favicon
|
||||
radioPlayer._name = model.name
|
||||
radioPlayer._countrycode = model.countrycode
|
||||
radioPlayer._tags = model.tags
|
||||
radioPlayer._codec = model.codec//getCodec(model.codec)
|
||||
radioPlayer._bitrate = model.bitrate //getBitrate(model.bitrate)
|
||||
radioPlayer._codec = model.codec
|
||||
radioPlayer._bitrate = model.bitrate
|
||||
radioPlayer._hls = model.hls
|
||||
radioPlayer._url_resolved = model.url_resolved
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
radioPlayer.playlistIndex = index
|
||||
|
||||
//console.log("Index: "+index)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,7 +205,7 @@ Page {
|
||||
|
||||
HeaderButton {
|
||||
visible: radioPlayer.playHistory.count > 0
|
||||
headerText: qsTr("Play history")//playedCountries.count > 0 ? "Trending in " + radioBrowser.getCountryName(playedCountries.get(0).alpha_2) : "Trending in " + radioBrowser.getCountryName(_country)
|
||||
headerText: qsTr("Play history")
|
||||
onClicked: pageStack.push("HistoryPage.qml")
|
||||
}
|
||||
|
||||
@@ -226,7 +215,7 @@ Page {
|
||||
height: playedTags.count > 0 ? Theme.itemSizeHuge * 1.35 : 0
|
||||
width: page.width
|
||||
cellHeight: height
|
||||
cellWidth: cellHeight * 0.75//Theme.itemSizeHuge + Theme.itemSizeMedium * 2
|
||||
cellWidth: cellHeight * 0.75
|
||||
flow: GridView.TopToBottom
|
||||
snapMode: SlideshowView.NoSnap
|
||||
layoutDirection: Qt.LeftToRight
|
||||
@@ -236,18 +225,21 @@ Page {
|
||||
delegate: SmallStationsDelegate {
|
||||
flagVisible: true
|
||||
onClicked: {
|
||||
console.log("*** CLICKED")
|
||||
if (model.url_resolved !== radioPlayer._url_resolved) {
|
||||
console.log("*** URL_RESOLVED")
|
||||
radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!?
|
||||
radioPlayer._favicon = model.favicon
|
||||
radioPlayer._name = model.name
|
||||
radioPlayer._countrycode = model.countrycode
|
||||
radioPlayer._tags = model.tags
|
||||
radioPlayer._codec = model.codec//getCodec(model.codec)
|
||||
radioPlayer._bitrate = model.bitrate //getBitrate(model.bitrate)
|
||||
radioPlayer._codec = model.codec
|
||||
radioPlayer._bitrate = model.bitrate
|
||||
radioPlayer._hls = model.hls
|
||||
radioPlayer._url_resolved = model.url_resolved
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
console.log("*** URL_RESOLVED END")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,7 +250,7 @@ Page {
|
||||
|
||||
HeaderButton {
|
||||
visible: radioPlayer.playHistory.count > 0
|
||||
headerText: qsTr("My most played Tags")//playedCountries.count > 0 ? "Trending in " + radioBrowser.getCountryName(playedCountries.get(0).alpha_2) : "Trending in " + radioBrowser.getCountryName(_country)
|
||||
headerText: qsTr("My most played Tags")
|
||||
onClicked: pageStack.push("TagListPage.qml",{})
|
||||
}
|
||||
|
||||
@@ -268,7 +260,7 @@ Page {
|
||||
height: playedTags.count > 0 ? Theme.itemSizeHuge * 1.35 : 0
|
||||
width: page.width
|
||||
cellHeight: height
|
||||
cellWidth: cellHeight * 0.75//Theme.itemSizeHuge + Theme.itemSizeMedium * 2
|
||||
cellWidth: cellHeight * 0.75
|
||||
flow: GridView.TopToBottom
|
||||
snapMode: SlideshowView.NoSnap
|
||||
layoutDirection: Qt.LeftToRight
|
||||
@@ -291,7 +283,7 @@ Page {
|
||||
height: Theme.itemSizeHuge * 1.35
|
||||
width: page.width
|
||||
cellHeight: height
|
||||
cellWidth: cellHeight * 0.75//Theme.itemSizeHuge + Theme.itemSizeMedium * 2
|
||||
cellWidth: cellHeight * 0.75
|
||||
flow: GridView.TopToBottom
|
||||
snapMode: SlideshowView.NoSnap
|
||||
layoutDirection: Qt.LeftToRight
|
||||
@@ -302,18 +294,21 @@ Page {
|
||||
delegate: SmallStationsDelegate {
|
||||
flagVisible: false
|
||||
onClicked: {
|
||||
console.log("*** CLICKED")
|
||||
if (model.url_resolved !== radioPlayer._url_resolved) {
|
||||
console.log("*** URL_RESOLVED")
|
||||
radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!?
|
||||
radioPlayer._favicon = model.favicon
|
||||
radioPlayer._name = model.name
|
||||
radioPlayer._countrycode = model.countrycode
|
||||
radioPlayer._tags = model.tags
|
||||
radioPlayer._codec = model.codec//getCodec(model.codec)
|
||||
radioPlayer._bitrate = model.bitrate //getBitrate(model.bitrate)
|
||||
radioPlayer._codec = model.codec
|
||||
radioPlayer._bitrate = model.bitrate
|
||||
radioPlayer._hls = model.hls
|
||||
radioPlayer._url_resolved = model.url_resolved
|
||||
radioPlayer._homepage = model.homepage
|
||||
radioPlayer._stationuuid = model.stationuuid
|
||||
radioPlayer.getStationFavorite(model.stationuuid)
|
||||
console.log("*** URL_RESOLVED END")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,7 +318,6 @@ Page {
|
||||
|
||||
HeaderButton {
|
||||
visible: playedCountries.count > 1
|
||||
// headerText: playedCountries.count > 0 ? "Trending in " + radioBrowser.getCountryName(playedCountries.get(1).alpha_2) : "Trending in " + radioBrowser.getCountryName(_country)
|
||||
headerText: playedCountries.count > 1 ? qsTr("Trending in")+" " + radioBrowser.getCountryName(playedCountries.get(1).alpha_2) : qsTr("Trending in")+" " + radioBrowser.getCountryName(_country)
|
||||
onClicked: pageStack.push("CountryStationsPage.qml",{searchby:"clicktrend",_countrycode: playedCountries.get(1).alpha_2})
|
||||
}
|
||||
@@ -333,7 +327,7 @@ Page {
|
||||
height: Theme.itemSizeHuge * 1.35
|
||||
width: page.width
|
||||
cellHeight: height
|
||||
cellWidth: cellHeight * 0.75//Theme.itemSizeHuge + Theme.itemSizeMedium * 2
|
||||
cellWidth: cellHeight * 0.75
|
||||
flow: GridView.TopToBottom
|
||||
snapMode: SlideshowView.NoSnap
|
||||
layoutDirection: Qt.LeftToRight
|
||||
@@ -345,9 +339,9 @@ Page {
|
||||
flagVisible: false
|
||||
onClicked: {
|
||||
if (model.url_resolved !== radioPlayer._url_resolved) {
|
||||
radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!?
|
||||
radioPlayer._favicon = model.favicon
|
||||
radioPlayer._name = model.name
|
||||
radioPlayer._countrycode = model.countrycode
|
||||
radioPlayer._tags = model.tags
|
||||
radioPlayer._codec = model.codec//getCodec(model.codec)
|
||||
radioPlayer._bitrate = model.bitrate //getBitrate(model.bitrate)
|
||||
@@ -364,7 +358,7 @@ Page {
|
||||
Item {height: Theme.paddingLarge;width: parent.width}
|
||||
|
||||
HeaderButton {
|
||||
headerText: qsTr("Trending in the world")//playedCountries.count > 0 ? "Trending in " + radioBrowser.getCountryName(playedCountries.get(0).alpha_2) : "Trending in " + radioBrowser.getCountryName(_country)
|
||||
headerText: qsTr("Trending in the world")
|
||||
onClicked: pageStack.push("CountryStationsPage.qml",{searchby:"clicktrend",_countrycode: ""})
|
||||
}
|
||||
|
||||
@@ -373,7 +367,7 @@ Page {
|
||||
height: Theme.itemSizeHuge * 1.35
|
||||
width: page.width
|
||||
cellHeight: height
|
||||
cellWidth: cellHeight * 0.75//Theme.itemSizeHuge + Theme.itemSizeMedium * 2
|
||||
cellWidth: cellHeight * 0.75
|
||||
flow: GridView.TopToBottom
|
||||
snapMode: SlideshowView.NoSnap
|
||||
layoutDirection: Qt.LeftToRight
|
||||
@@ -382,9 +376,9 @@ Page {
|
||||
flagVisible: true
|
||||
onClicked: {
|
||||
if (model.url_resolved !== radioPlayer._url_resolved) {
|
||||
radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!?
|
||||
radioPlayer._favicon = model.favicon
|
||||
radioPlayer._name = model.name
|
||||
radioPlayer._countrycode = model.countrycode
|
||||
radioPlayer._tags = model.tags
|
||||
radioPlayer._codec = model.codec//getCodec(model.codec)
|
||||
radioPlayer._bitrate = model.bitrate //getBitrate(model.bitrate)
|
||||
@@ -404,8 +398,6 @@ Page {
|
||||
Favorites.getTagsRecentClicked(playedTags,15)
|
||||
Favorites.getFavorites(favorites,"myclickcount",15)
|
||||
Favorites.getCountryRecentClicked(playedCountries,4)
|
||||
|
||||
|
||||
getTrending1.countrycode = playedCountries.count > 0 ? playedCountries.get(0).alpha_2 : _country
|
||||
getTrending1.order = "clicktrend"
|
||||
getTrending1.offset = 0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
import QtQuick.LocalStorage 2.0
|
||||
import "../helpers/db.js" as Favorites
|
||||
import "../delegates"
|
||||
|
||||
Page {
|
||||
@@ -26,7 +27,7 @@ Page {
|
||||
width: parent.width
|
||||
placeholderText: "Search"
|
||||
text: ""
|
||||
inputMethodHints: Qt.ImhNoAutoUppercase //| Qt.ImhNoPredictiveText
|
||||
inputMethodHints: Qt.ImhNoAutoUppercase
|
||||
EnterKey.iconSource: "image://theme/icon-m-enter-close"
|
||||
EnterKey.onClicked: {focus = false}
|
||||
focus: sfocus
|
||||
@@ -42,7 +43,7 @@ Page {
|
||||
|
||||
onClicked: {
|
||||
sfocus=false;
|
||||
settings.setValue("lastCountry",alpha_2)
|
||||
Favorites.setSetting("lastCountry",alpha_2)
|
||||
pageStack.push("CountryStationsPage.qml",{stationCount: stationcount,_countrycode: alpha_2,searchby:"name"})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ Page {
|
||||
property string filterby
|
||||
property alias searchby: getCountryStations.order
|
||||
property string searchtext: ""
|
||||
property string _countrycode: ""
|
||||
property string countrycode: ""
|
||||
property int stationCount: 0
|
||||
property alias name: getCountryStations.name
|
||||
property alias tag: getCountryStations.tag
|
||||
@@ -47,8 +47,8 @@ Page {
|
||||
ViewPlaceholder {
|
||||
anchors.centerIn: parent
|
||||
enabled: view.count == 0
|
||||
text: getCountryStations.finished && view.count === 0 ? "Oh no..." : "Please wait"
|
||||
hintText: getCountryStations.finished && view.count === 0 ? "No radio stations!?!" : "getting radio stations"
|
||||
text: getCountryStations.finished && view.count === 0 ? qsTr("Oh no...") : qsTr("Please wait")
|
||||
hintText: getCountryStations.finished && view.count === 0 ? qsTr("No radio stations!?!") : qsTr("getting radio stations")
|
||||
}
|
||||
|
||||
VerticalScrollDecorator {}
|
||||
@@ -74,7 +74,7 @@ Page {
|
||||
anchors.topMargin: Theme.paddingLarge
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.rightMargin: Theme.paddingLarge//headerLogo.width + (Theme.paddingLarge * 2)
|
||||
anchors.rightMargin: Theme.paddingLarge
|
||||
anchors.leftMargin: Theme.paddingLarge
|
||||
|
||||
Row {
|
||||
@@ -86,7 +86,7 @@ Page {
|
||||
height: ccode.height * 0.8
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
source: _countrycode === "" ? "../images/bycountry_t.png" : "../flags/"+_countrycode.toLowerCase()+".png"
|
||||
source: countrycode === "" ? "../images/bycountry_t.png" : "../flags/"+countrycode.toLowerCase()+".png"
|
||||
}
|
||||
Label {
|
||||
id: ccode
|
||||
@@ -94,7 +94,7 @@ Page {
|
||||
color: Theme.highlightColor
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideLeft
|
||||
text: getCountryStations.country //+ " ["+stationCount+"]"
|
||||
text: getCountryStations.country
|
||||
}
|
||||
}
|
||||
Label {
|
||||
@@ -102,7 +102,7 @@ Page {
|
||||
color: Theme.secondaryHighlightColor
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
text: sortedby//view.count + " channels"
|
||||
text: sortedby
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ Page {
|
||||
width: parent.width
|
||||
SearchField {
|
||||
id: sfield
|
||||
placeholderText: "Search"
|
||||
placeholderText: qsTr("Search")
|
||||
inputMethodHints: Qt.ImhNoAutoUppercase
|
||||
EnterKey.iconSource: "image://theme/icon-m-enter-close"
|
||||
EnterKey.onClicked: focus = false
|
||||
@@ -148,8 +148,8 @@ Page {
|
||||
label: "Search by:"
|
||||
currentIndex: comboIndex
|
||||
menu: ContextMenu {
|
||||
MenuItem { text: "Name" }
|
||||
MenuItem { text: "Tag" }
|
||||
MenuItem { text: qsTr("Name") }
|
||||
MenuItem { text: qsTr("Tag") }
|
||||
}
|
||||
onValueChanged: {
|
||||
switch(currentIndex) {
|
||||
@@ -157,9 +157,9 @@ Page {
|
||||
case 1: filterby="tag";getCountryStations.offset=0;getCountryStations.tag=sfield.text;getCountryStations.name=""
|
||||
}
|
||||
if (searchtext.length !== 0) {
|
||||
getCountryStations.offset=0;
|
||||
getCountryStations.clear = true
|
||||
getCountryStations.getStations()
|
||||
getCountryStations.offset=0;
|
||||
getCountryStations.clear = true
|
||||
getCountryStations.getStations()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,19 +168,19 @@ Page {
|
||||
|
||||
PullDownMenu {
|
||||
MenuItem {
|
||||
text: "Name"
|
||||
text: qsTr("Name")
|
||||
onClicked: {getCountryStations.clear=true;getCountryStations.order = "name";getCountryStations.getStations()}//;xmlModel.running = true}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Most likes"
|
||||
text: qsTr("Most likes")
|
||||
onClicked: {getCountryStations.clear=true;getCountryStations.order = "votes";getCountryStations.getStations()}//;xmlModel.running = true}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Most played"
|
||||
text: qsTr("Most played")
|
||||
onClicked: {getCountryStations.clear=true;getCountryStations.order = "clickcount";getCountryStations.getStations()}//xmlModel.running = true}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Trending right now"
|
||||
text: qsTr("Trending right now")
|
||||
onClicked: {getCountryStations.clear=true;getCountryStations.order = "clicktrend";getCountryStations.getStations()}//xmlModel.running = true}
|
||||
}
|
||||
}
|
||||
@@ -205,8 +205,9 @@ Page {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
getCountryStations.countrycode=_countrycode
|
||||
getCountryStations.countrycode=countrycode
|
||||
getCountryStations.order=searchby
|
||||
getCountryStations.getStations()
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ Page {
|
||||
|
||||
PageHeader {
|
||||
id: pheader
|
||||
z: orientation === Orientation.Portrait || !screenTimer.running ? 98 : 0
|
||||
z: orientation === Orientation.Portrait //|| !screenTimer.running ? 98 : 0
|
||||
visible: orientation !== Orientation.LandscapeMask
|
||||
|
||||
Column {
|
||||
@@ -263,9 +263,9 @@ Page {
|
||||
id: sleeptimer
|
||||
source: "image://theme/icon-s-timer"
|
||||
height: play.height
|
||||
width: height
|
||||
width: favorite.height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.verticalCenter: play.verticalCenter
|
||||
anchors.verticalCenter: favorite.verticalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
@@ -291,6 +291,7 @@ Page {
|
||||
property bool returnValue: false
|
||||
source: returnValue ? "image://theme/icon-m-like" : "image://theme/icon-m-outline-like"
|
||||
height: favorite.height
|
||||
anchors.verticalCenter: favorite.verticalCenter
|
||||
width: height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
onReturnValueChanged: console.log(" RETURN VALUE: "+upvote.returnValue)
|
||||
|
||||
Reference in New Issue
Block a user