Tweaking and fixing
This commit is contained in:
parent
f3c06d738f
commit
7f0d724bad
@ -14,8 +14,20 @@ MprisPlayer {
|
||||
supportedMimeTypes: ["audio/x-wav", "audio/x-vorbis+ogg", "audio/mpeg", "audio/mp4a-latm", "audio/x-aiff"]
|
||||
|
||||
canControl: true
|
||||
/*
|
||||
function playNext() {
|
||||
if (playlistIndex < playlistCount && playlistIndex < playlist.count) playlistIndex = playlistIndex + 1
|
||||
loadPlaylistSelected()
|
||||
}
|
||||
|
||||
canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count //true //appstate.playlistIndex < appstate.playlist.count
|
||||
function playPrev() {
|
||||
if (playlistIndex <= playlistCount && playlistIndex > 0) playlistIndex = playlistIndex - 1 //: playlistIndex = 0
|
||||
loadPlaylistSelected()
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 //true //appstate.playlistIndex < appstate.playlist.count
|
||||
canGoPrevious: radioPlayer.playlistIndex > 0 // appstate.playlistIndex > 0
|
||||
canPause: radioPlayer.isPlaying ? true : false
|
||||
canPlay: radioPlayer.isPaused ? true : false
|
||||
|
@ -46,7 +46,10 @@ MediaPlayer {
|
||||
property int maxTagClicks: 0
|
||||
property int playlistCount: playlist.count - 1
|
||||
property int playlistIndex: allradioSettings.value("currentFavorite",-1)
|
||||
property QDtimer timer: QDtimer {id: qdTimer}
|
||||
property QDtimer timer: QDtimer {
|
||||
id: qdTimer
|
||||
interval: 200; running: false; repeat: false
|
||||
}
|
||||
//property string videoOut: ""
|
||||
// property ListModel mostPlayedFavorites: ListModel {id: mostPlayedFavorites}
|
||||
//videoOutput: videoOut
|
||||
@ -145,12 +148,12 @@ MediaPlayer {
|
||||
|
||||
|
||||
function playNext() {
|
||||
playlistIndex < playlistCount && playlistIndex > -1 ? playlistIndex = playlistIndex + 1 : playlistIndex = 0
|
||||
if (playlistIndex < playlistCount && playlistIndex < playlist.count) playlistIndex = playlistIndex + 1
|
||||
loadPlaylistSelected()
|
||||
}
|
||||
|
||||
function playPrev() {
|
||||
playlistIndex < playlistCount && playlistIndex > 0 ? playlistIndex = playlistIndex - 1 : playlistIndex = 0
|
||||
if (playlistIndex <= playlistCount && playlistIndex > -1) playlistIndex = playlistIndex - 1 //: playlistIndex = 0
|
||||
loadPlaylistSelected()
|
||||
}
|
||||
|
||||
@ -277,7 +280,7 @@ MediaPlayer {
|
||||
notification.body = "End of media"
|
||||
notification.publish()
|
||||
//console.log("Status: End Of Media")
|
||||
radioPlayer.stopStream()
|
||||
radioPlayer.resumeStream()
|
||||
// }
|
||||
}
|
||||
function status8 () { // InvalidMedia
|
||||
@ -335,7 +338,7 @@ MediaPlayer {
|
||||
|
||||
function reloadDbData() {
|
||||
Favorites.getStationRecentClicked(playHistory,15)
|
||||
Favorites.getFavorites(playlist,"name",10000)
|
||||
Favorites.getFavorites(playlist,"myclickcount",10000)
|
||||
//Favorites.getStationMostClickedFav(radioPlayermostPlayed,settings._nrOfFavoritePreview)
|
||||
//Favorites.getCountryRecentClicked(playedCountries,2)
|
||||
//Favorites.getTagsRecentClicked(playedTags,10)
|
||||
|
@ -228,7 +228,7 @@ Page {
|
||||
}
|
||||
Image {
|
||||
id: playDLNA
|
||||
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count
|
||||
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count -1
|
||||
opacity: enabled ? 1.0 : 0.4
|
||||
source: "image://theme/icon-m-next"
|
||||
height: play.height
|
||||
|
Loading…
x
Reference in New Issue
Block a user