Prev and next only when playing favorites
This commit is contained in:
parent
1cf3224545
commit
ce873bde7b
@ -27,8 +27,9 @@ MprisPlayer {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 //true //appstate.playlistIndex < appstate.playlist.count
|
canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 && radioPlayer._favorite
|
||||||
canGoPrevious: radioPlayer.playlistIndex > 0 // appstate.playlistIndex > 0
|
//true //appstate.playlistIndex < appstate.playlist.count
|
||||||
|
canGoPrevious: radioPlayer.playlistIndex > 0 && radioPlayer._favorite// appstate.playlistIndex > 0
|
||||||
canPause: radioPlayer.isPlaying ? true : false
|
canPause: radioPlayer.isPlaying ? true : false
|
||||||
canPlay: radioPlayer.isPaused ? true : false
|
canPlay: radioPlayer.isPaused ? true : false
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ MediaPlayer {
|
|||||||
property int stationOk: 3
|
property int stationOk: 3
|
||||||
property int maxTagClicks: 0
|
property int maxTagClicks: 0
|
||||||
property int playlistCount: playlist.count - 1
|
property int playlistCount: playlist.count - 1
|
||||||
property int playlistIndex: Favorites.getSetting("playlistIndex",-1)
|
//property int playlistIndex: Favorites.getSetting("playlistIndex",-1)
|
||||||
|
property int playlistIndex: -1
|
||||||
property QDtimer timer: QDtimer {
|
property QDtimer timer: QDtimer {
|
||||||
id: qdTimer
|
id: qdTimer
|
||||||
interval: 200; running: false; repeat: false
|
interval: 200; running: false; repeat: false
|
||||||
@ -63,7 +64,7 @@ MediaPlayer {
|
|||||||
autoPlay: false
|
autoPlay: false
|
||||||
autoLoad: true
|
autoLoad: true
|
||||||
|
|
||||||
onPlaylistIndexChanged: console.log("INDEX: "+playlistIndex)
|
//onPlaylistIndexChanged: console.log("INDEX: "+playlistIndex)
|
||||||
|
|
||||||
//on_FavoriteChanged: {setStationFavorite(_stationuuid,_name,_countrycode,_homepage,_url_resolved,_favicon,_tags,_codec,_bitrate,_hls,_favorite);Favorites.getMostPlayedFavorites(mostPlayedFavorites,15)}
|
//on_FavoriteChanged: {setStationFavorite(_stationuuid,_name,_countrycode,_homepage,_url_resolved,_favicon,_tags,_codec,_bitrate,_hls,_favorite);Favorites.getMostPlayedFavorites(mostPlayedFavorites,15)}
|
||||||
onPlaying: if (!playerPageOpen) pageStack.push("../pages/RadioPlayerPage.qml")
|
onPlaying: if (!playerPageOpen) pageStack.push("../pages/RadioPlayerPage.qml")
|
||||||
@ -195,7 +196,7 @@ MediaPlayer {
|
|||||||
isPlaying = true
|
isPlaying = true
|
||||||
isPaused = false
|
isPaused = false
|
||||||
qdTimer.start()
|
qdTimer.start()
|
||||||
Favorites.setSetting("playlistIndex",playlistIndex)
|
//Favorites.setSetting("playlistIndex",playlistIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
onError: {
|
onError: {
|
||||||
|
@ -202,7 +202,8 @@ Page {
|
|||||||
spacing: Theme.paddingMedium
|
spacing: Theme.paddingMedium
|
||||||
Image {
|
Image {
|
||||||
id: playprev
|
id: playprev
|
||||||
enabled: radioPlayer.playlistIndex > 0
|
enabled: radioPlayer.playlistIndex > 0 && radioPlayer._favorite
|
||||||
|
visible: radioPlayer._favorite
|
||||||
opacity: enabled ? 1.0 : 0.4
|
opacity: enabled ? 1.0 : 0.4
|
||||||
source: "image://theme/icon-m-previous"
|
source: "image://theme/icon-m-previous"
|
||||||
height: play.height
|
height: play.height
|
||||||
@ -228,7 +229,8 @@ Page {
|
|||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
id: playDLNA
|
id: playDLNA
|
||||||
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count -1
|
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 && radioPlayer._favorite
|
||||||
|
visible: radioPlayer._favorite
|
||||||
opacity: enabled ? 1.0 : 0.4
|
opacity: enabled ? 1.0 : 0.4
|
||||||
source: "image://theme/icon-m-next"
|
source: "image://theme/icon-m-next"
|
||||||
height: play.height
|
height: play.height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user