Working on some kind of playlist management

This commit is contained in:
2025-06-04 08:16:55 +02:00
parent 7f0d724bad
commit 1cf3224545
7 changed files with 86 additions and 30 deletions
+5
View File
@@ -173,6 +173,7 @@ Page {
GridView {
//clip: true
id: favoriteView
clip: true
height: Theme.itemSizeHuge * 1.35
width: page.width
@@ -201,6 +202,10 @@ Page {
radioPlayer._homepage = model.homepage
radioPlayer._stationuuid = model.stationuuid
radioPlayer.getStationFavorite(model.stationuuid)
radioPlayer.playlistIndex = index
console.log("Index: "+index)
}
}
}
+7 -2
View File
@@ -7,7 +7,7 @@ import "../helpers/db.js" as Favorites
Page {
property ListModel favorites: ListModel {id: favorites}
property real showP: 0.0
property int tab: allradioSettings.value("favoriteTab",0)
property int tab: 0//allradioSettings.value("favoriteTab",0)
SilicaListView {
id: view
@@ -98,7 +98,12 @@ Page {
radioPlayer._homepage = model.homepage
radioPlayer._stationuuid = model.stationuuid
radioPlayer._favorite = model.favorite ? true : false
radioPlayer.fav
//pageStack.push("RadioPlayerPage.qml")
radioPlayer.playlistIndex = index
console.log("Index: "+index)
}
}
}
@@ -117,7 +122,7 @@ Page {
updateFav()
}
Component.onDestruction: {
allradioSettings.setValue("favoriteTab",tab)
//allradioSettings.setValue("favoriteTab",tab)
}
}
}
+1
View File
@@ -51,6 +51,7 @@ Page {
radioPlayer._homepage = model.homepage
radioPlayer._stationuuid = model.stationuuid
radioPlayer._favorite = model.favorite ? true : false
radioPlayer.playlistIndex = favoriteView.currentIndex
//pageStack.push("RadioPlayerPage.qml")
}
}
+15 -15
View File
@@ -242,6 +242,21 @@ Page {
}
}
}
}
}
Rectangle {
visible: orientation === Orientation.Portrait
width: sleeptimer.width + upvote.width + favorite.width + (Theme.paddingMedium * 4)
height: upvote.height + (Theme.paddingMedium * 2)
radius: 90
color: Theme.rgba(Theme.overlayBackgroundColor,0.5)
border.width: 0
anchors.right: parent.right
anchors.rightMargin: Theme.paddingLarge
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
id: sleeptimer
source: "image://theme/icon-s-timer"
@@ -256,21 +271,6 @@ Page {
}
}
}
}
}
Rectangle {
visible: orientation === Orientation.Portrait
width: upvote.width + favorite.width + (Theme.paddingMedium * 4)
height: upvote.height + (Theme.paddingMedium * 2)
radius: 90
color: Theme.rgba(Theme.overlayBackgroundColor,0.5)
border.width: 0
anchors.right: parent.right
anchors.rightMargin: Theme.paddingLarge
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
id: favorite
source: radioPlayer._favorite ? "image://theme/icon-m-favorite-selected" : "image://theme/icon-m-favorite"