fixed TODOs, first checkpoint saving queue on server

This commit is contained in:
Siiiiinth
2026-02-01 18:46:49 +01:00
parent e05542844a
commit 46c3fb15c4
5 changed files with 81 additions and 38 deletions
+9 -2
View File
@@ -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)
}