diff --git a/qml/items/RadioMprisPlayer.qml b/qml/items/RadioMprisPlayer.qml index 268768a..b9407b6 100644 --- a/qml/items/RadioMprisPlayer.qml +++ b/qml/items/RadioMprisPlayer.qml @@ -27,8 +27,9 @@ MprisPlayer { */ - canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 //true //appstate.playlistIndex < appstate.playlist.count - canGoPrevious: radioPlayer.playlistIndex > 0 // appstate.playlistIndex > 0 + canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 && radioPlayer._favorite +//true //appstate.playlistIndex < appstate.playlist.count + canGoPrevious: radioPlayer.playlistIndex > 0 && radioPlayer._favorite// appstate.playlistIndex > 0 canPause: radioPlayer.isPlaying ? true : false canPlay: radioPlayer.isPaused ? true : false diff --git a/qml/items/RadioPlayer.qml b/qml/items/RadioPlayer.qml index c96eff1..8441312 100644 --- a/qml/items/RadioPlayer.qml +++ b/qml/items/RadioPlayer.qml @@ -45,7 +45,8 @@ MediaPlayer { property int stationOk: 3 property int maxTagClicks: 0 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 { id: qdTimer interval: 200; running: false; repeat: false @@ -63,7 +64,7 @@ MediaPlayer { autoPlay: false 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)} onPlaying: if (!playerPageOpen) pageStack.push("../pages/RadioPlayerPage.qml") @@ -195,7 +196,7 @@ MediaPlayer { isPlaying = true isPaused = false qdTimer.start() - Favorites.setSetting("playlistIndex",playlistIndex) + //Favorites.setSetting("playlistIndex",playlistIndex) } onError: { diff --git a/qml/pages/RadioPlayerPage.qml b/qml/pages/RadioPlayerPage.qml index 2a65c99..e2acbf2 100644 --- a/qml/pages/RadioPlayerPage.qml +++ b/qml/pages/RadioPlayerPage.qml @@ -202,7 +202,8 @@ Page { spacing: Theme.paddingMedium Image { id: playprev - enabled: radioPlayer.playlistIndex > 0 + enabled: radioPlayer.playlistIndex > 0 && radioPlayer._favorite + visible: radioPlayer._favorite opacity: enabled ? 1.0 : 0.4 source: "image://theme/icon-m-previous" height: play.height @@ -228,7 +229,8 @@ Page { } Image { 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 source: "image://theme/icon-m-next" height: play.height