wip restore queues on start
This commit is contained in:
@@ -260,7 +260,7 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
|
||||
go a.page.pm.PlayAlbum(a.page.albumID, 0, false)
|
||||
})
|
||||
shuffleBtn := widget.NewButtonWithIcon(lang.L("Shuffle"), myTheme.ShuffleIcon, func() {
|
||||
a.page.pm.LoadTracks(a.page.tracklist.GetTracks(), backend.Replace, true)
|
||||
a.page.pm.LoadTracks(a.page.tracklist.GetTracks(), backend.Replace, backend.Both, true)
|
||||
a.page.pm.PlayFromBeginning()
|
||||
})
|
||||
var pop *widget.PopUpMenu
|
||||
|
||||
@@ -98,7 +98,7 @@ func (a *FavoritesPage) createHeader(activeBtnIdx int) {
|
||||
widget.NewButtonWithIcon("", myTheme.TracksIcon, a.onShowFavoriteSongs))
|
||||
a.shuffleBtn = widget.NewButtonWithIcon(lang.L("Shuffle"), myTheme.ShuffleIcon, func() {
|
||||
if tr := a.tracklistOrNil(); tr != nil {
|
||||
a.pm.LoadTracks(tr.GetTracks(), backend.Replace, true /*shuffle*/)
|
||||
a.pm.LoadTracks(tr.GetTracks(), backend.Replace, backend.Both, true /*shuffle*/)
|
||||
a.pm.PlayFromBeginning()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -159,18 +159,18 @@ func NewNowPlayingPage(
|
||||
a.relatedList.OnSetRating = a.queueList.OnSetRating
|
||||
a.relatedList.OnSetFavorite = a.queueList.OnSetFavorite
|
||||
a.relatedList.OnPlayItemAt = func(idx int) {
|
||||
a.pm.LoadTracks(a.related, backend.Replace, false)
|
||||
a.pm.LoadTracks(a.related, backend.Replace, backend.Both, false)
|
||||
a.pm.PlayTrackAt(idx)
|
||||
}
|
||||
a.relatedList.OnAddToQueue = func(items []mediaprovider.MediaItem) {
|
||||
a.pm.LoadItems(items, backend.Append, false)
|
||||
a.pm.LoadItems(items, backend.Append, backend.Both, false)
|
||||
}
|
||||
a.relatedList.OnPlaySelection = func(items []mediaprovider.MediaItem, shuffle bool) {
|
||||
a.pm.LoadItems(items, backend.Replace, shuffle)
|
||||
a.pm.LoadItems(items, backend.Replace, backend.Both, shuffle)
|
||||
a.pm.PlayFromBeginning()
|
||||
}
|
||||
a.relatedList.OnPlaySelectionNext = func(items []mediaprovider.MediaItem) {
|
||||
a.pm.LoadItems(items, backend.InsertNext, false)
|
||||
a.pm.LoadItems(items, backend.InsertNext, backend.Both, false)
|
||||
}
|
||||
a.relatedList.OnPlaySongRadio = func(track *mediaprovider.Track) {
|
||||
go func() {
|
||||
|
||||
@@ -348,11 +348,11 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader {
|
||||
})
|
||||
a.editButton.Hidden = true
|
||||
playButton := widget.NewButtonWithIcon(lang.L("Play"), theme.MediaPlayIcon(), func() {
|
||||
a.page.pm.LoadTracks(a.page.tracks, backend.Replace, false)
|
||||
a.page.pm.LoadTracks(a.page.tracks, backend.Replace, backend.Both, false)
|
||||
a.page.pm.PlayFromBeginning()
|
||||
})
|
||||
shuffleBtn := widget.NewButtonWithIcon(lang.L("Shuffle"), myTheme.ShuffleIcon, func() {
|
||||
a.page.pm.LoadTracks(a.page.tracks, backend.Replace, true)
|
||||
a.page.pm.LoadTracks(a.page.tracks, backend.Replace, backend.Both, true)
|
||||
a.page.pm.PlayFromBeginning()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user