wip restore queues on start

This commit is contained in:
Siiiiinth
2026-02-09 08:09:01 +01:00
parent 2d29b7f271
commit 48226d5461
10 changed files with 101 additions and 61 deletions
+4 -2
View File
@@ -35,6 +35,7 @@ type playbackCommand struct {
Arg any
Arg2 any
Arg3 any
Arg4 any
OnDone func()
}
@@ -148,13 +149,14 @@ func (c *playbackCommandQueue) LoadRadioStation(radio *mediaprovider.RadioStatio
c.cmdAvailable.Signal()
}
func (c *playbackCommandQueue) LoadItems(items []mediaprovider.MediaItem, insertQueueMode InsertQueueMode, shuffle bool) {
func (c *playbackCommandQueue) LoadItems(items []mediaprovider.MediaItem, insertQueueMode InsertQueueMode, queueType QueueType, shuffle bool) {
c.mutex.Lock()
c.queue = append(c.queue, playbackCommand{
Type: cmdLoadItems,
Arg: items,
Arg2: insertQueueMode,
Arg3: shuffle,
Arg3: queueType,
Arg4: shuffle,
})
c.mutex.Unlock()
c.cmdAvailable.Signal()