in progress MediaItem refactor - does not build

This commit is contained in:
Drew Weymouth
2024-05-31 09:35:46 -07:00
parent 403e1a19b5
commit f67a0c5fc1
10 changed files with 171 additions and 44 deletions
+6 -3
View File
@@ -29,9 +29,12 @@ func SavePlayQueue(serverID string, pm *PlaybackManager, filepath string, server
stats := pm.PlayerStatus()
trackIdx := pm.NowPlayingIndex()
trackIDs := make([]string, len(queue))
for i, tr := range queue {
trackIDs[i] = tr.ID
trackIDs := make([]string, 0, len(queue))
for _, item := range queue {
if _, ok := item.(*mediaprovider.Track); ok {
// dont' save radio stations in play queue
trackIDs = append(trackIDs, item.MediaItemID())
}
}
saved := serializedSavedPlayQueue{