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"]
|
supportedMimeTypes: ["audio/x-wav", "audio/x-vorbis+ogg", "audio/mpeg", "audio/mp4a-latm", "audio/x-aiff"]
|
||||||
|
|
||||||
canControl: true
|
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
|
canGoPrevious: radioPlayer.playlistIndex > 0 // appstate.playlistIndex > 0
|
||||||
canPause: radioPlayer.isPlaying ? true : false
|
canPause: radioPlayer.isPlaying ? true : false
|
||||||
canPlay: radioPlayer.isPaused ? true : false
|
canPlay: radioPlayer.isPaused ? true : false
|
||||||
|
@ -46,7 +46,10 @@ MediaPlayer {
|
|||||||
property int maxTagClicks: 0
|
property int maxTagClicks: 0
|
||||||
property int playlistCount: playlist.count - 1
|
property int playlistCount: playlist.count - 1
|
||||||
property int playlistIndex: allradioSettings.value("currentFavorite",-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 string videoOut: ""
|
||||||
// property ListModel mostPlayedFavorites: ListModel {id: mostPlayedFavorites}
|
// property ListModel mostPlayedFavorites: ListModel {id: mostPlayedFavorites}
|
||||||
//videoOutput: videoOut
|
//videoOutput: videoOut
|
||||||
@ -145,12 +148,12 @@ MediaPlayer {
|
|||||||
|
|
||||||
|
|
||||||
function playNext() {
|
function playNext() {
|
||||||
playlistIndex < playlistCount && playlistIndex > -1 ? playlistIndex = playlistIndex + 1 : playlistIndex = 0
|
if (playlistIndex < playlistCount && playlistIndex < playlist.count) playlistIndex = playlistIndex + 1
|
||||||
loadPlaylistSelected()
|
loadPlaylistSelected()
|
||||||
}
|
}
|
||||||
|
|
||||||
function playPrev() {
|
function playPrev() {
|
||||||
playlistIndex < playlistCount && playlistIndex > 0 ? playlistIndex = playlistIndex - 1 : playlistIndex = 0
|
if (playlistIndex <= playlistCount && playlistIndex > -1) playlistIndex = playlistIndex - 1 //: playlistIndex = 0
|
||||||
loadPlaylistSelected()
|
loadPlaylistSelected()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,7 +280,7 @@ MediaPlayer {
|
|||||||
notification.body = "End of media"
|
notification.body = "End of media"
|
||||||
notification.publish()
|
notification.publish()
|
||||||
//console.log("Status: End Of Media")
|
//console.log("Status: End Of Media")
|
||||||
radioPlayer.stopStream()
|
radioPlayer.resumeStream()
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
function status8 () { // InvalidMedia
|
function status8 () { // InvalidMedia
|
||||||
@ -335,7 +338,7 @@ MediaPlayer {
|
|||||||
|
|
||||||
function reloadDbData() {
|
function reloadDbData() {
|
||||||
Favorites.getStationRecentClicked(playHistory,15)
|
Favorites.getStationRecentClicked(playHistory,15)
|
||||||
Favorites.getFavorites(playlist,"name",10000)
|
Favorites.getFavorites(playlist,"myclickcount",10000)
|
||||||
//Favorites.getStationMostClickedFav(radioPlayermostPlayed,settings._nrOfFavoritePreview)
|
//Favorites.getStationMostClickedFav(radioPlayermostPlayed,settings._nrOfFavoritePreview)
|
||||||
//Favorites.getCountryRecentClicked(playedCountries,2)
|
//Favorites.getCountryRecentClicked(playedCountries,2)
|
||||||
//Favorites.getTagsRecentClicked(playedTags,10)
|
//Favorites.getTagsRecentClicked(playedTags,10)
|
||||||
|
@ -228,7 +228,7 @@ Page {
|
|||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
id: playDLNA
|
id: playDLNA
|
||||||
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count
|
enabled: radioPlayer.playlistIndex < radioPlayer.playlist.count -1
|
||||||
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