fixed TODOs, first checkpoint saving queue on server
This commit is contained in:
@@ -385,7 +385,7 @@ func (p *PlaybackManager) LoadPlaylist(playlistID string, insertQueueMode Insert
|
||||
// Load tracks into the play queue.
|
||||
// If replacing the current queue (!appendToQueue), playback will be stopped.
|
||||
func (p *PlaybackManager) LoadTracks(tracks []*mediaprovider.Track, insertQueueMode InsertQueueMode, shuffle bool) {
|
||||
items := copyTrackSliceToMediaItemSlice(tracks)
|
||||
items := sharedutil.CopyTrackSliceToMediaItemSlice(tracks)
|
||||
p.cmdQueue.LoadItems(items, insertQueueMode, shuffle)
|
||||
}
|
||||
|
||||
@@ -565,10 +565,18 @@ func (p *PlaybackManager) fetchAndPlayTracks(fetchFn func() ([]*mediaprovider.Tr
|
||||
}
|
||||
}
|
||||
|
||||
func (p *PlaybackManager) GetActivePlayQueue() []mediaprovider.MediaItem {
|
||||
return p.engine.GetActivePlayQueueDeepCopy()
|
||||
}
|
||||
|
||||
func (p *PlaybackManager) GetPlayQueue() []mediaprovider.MediaItem {
|
||||
return p.engine.GetPlayQueueDeepCopy()
|
||||
}
|
||||
|
||||
func (p *PlaybackManager) GetShuffledPlayQueue() []mediaprovider.MediaItem {
|
||||
return p.engine.GetShuffledPlayQueueDeepCopy()
|
||||
}
|
||||
|
||||
// Any time the user changes the favorite status of a track elsewhere in the app,
|
||||
// this should be called to ensure the in-memory track model is updated.
|
||||
func (p *PlaybackManager) OnTrackFavoriteStatusChanged(id string, fav bool) {
|
||||
@@ -640,7 +648,6 @@ func (p *PlaybackManager) SetAutoplay(autoplay bool) {
|
||||
|
||||
func (p *PlaybackManager) SetShuffle(shuffle bool) {
|
||||
p.cfg.Shuffle = shuffle
|
||||
fmt.Println("Setting shuffle in config")
|
||||
p.engine.SetShuffle(shuffle)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user