Mpris and prev/next playlist functions
This commit is contained in:
@@ -200,6 +200,22 @@ Page {
|
||||
id: row
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.paddingMedium
|
||||
Image {
|
||||
id: playprev
|
||||
enabled: radioPlayer.playlistIndex > 0
|
||||
opacity: enabled ? 1.0 : 0.4
|
||||
source: "image://theme/icon-m-previous"
|
||||
height: play.height
|
||||
width: height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.verticalCenter: play.verticalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
radioPlayer.playPrev()
|
||||
}
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: play
|
||||
source: radioPlayer.isPlaying ? "image://theme/icon-l-pause" : "image://theme/icon-l-play"
|
||||
@@ -211,25 +227,23 @@ Page {
|
||||
}
|
||||
}
|
||||
Image {
|
||||
|
||||
id: playDLNA
|
||||
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count
|
||||
opacity: enabled ? 1.0 : 0.4
|
||||
source: "image://theme/icon-m-next"
|
||||
height: play.height
|
||||
width: height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.verticalCenter: play.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
console.log(radioPlayer.playlistIndex + " | "+radioPlayer.playlistCount)
|
||||
radioPlayer.playlistIndex < radioPlayer.playlistCount && radioPlayer.playlistIndex > -1 ? radioPlayer.playlistIndex = radioPlayer.playlistIndex + 1 : radioPlayer.playlistIndex = 0
|
||||
radioPlayer.loadPlaylistSelected()
|
||||
|
||||
radioPlayer.playNext()
|
||||
}
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: sleeptimer
|
||||
source: "image://theme/icon-s-timer"
|
||||
height: play.height
|
||||
width: height
|
||||
@@ -239,22 +253,15 @@ Page {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
pageStack.push("SleepTimerPage.qml")
|
||||
/* console.log(radioPlayer.playlistIndex + " | "+radioPlayer.playlistCount)
|
||||
|
||||
if (radioPlayer.playlistIndex > -1) {
|
||||
radioPlayer.playlistIndex > 0 ? radioPlayer.playlistIndex = radioPlayer.playlistIndex - 1 : radioPlayer.playlistIndex = 16
|
||||
} else radioPlayer.playlistIndex = 0
|
||||
radioPlayer.loadPlaylistSelected() */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
visible: orientation === Orientation.Portrait
|
||||
width: upvote.width + url.width + favorite.width + (Theme.paddingMedium * 4)
|
||||
width: upvote.width + favorite.width + (Theme.paddingMedium * 4)
|
||||
height: upvote.height + (Theme.paddingMedium * 2)
|
||||
radius: 90
|
||||
color: Theme.rgba(Theme.overlayBackgroundColor,0.5)
|
||||
@@ -290,19 +297,6 @@ Page {
|
||||
onClicked: {radioBrowser.upVote(radioPlayer._stationuuid,upvote.returnValue)}
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: url
|
||||
source: "image://theme/icon-m-website"
|
||||
height: favorite.height
|
||||
width: height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
statusInfo.visible = true;remorse.execute(statusInfo,qsTr("<h2>Open radio station webpage</h2>"), function() {Qt.openUrlExternally(radioPlayer._homepage)}, 5000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user