Skip to content

Commit

Permalink
connect: add queue-uid for set_queue command
Browse files Browse the repository at this point in the history
  • Loading branch information
photovoltex committed Nov 24, 2024
1 parent 27c0ab6 commit 232fb60
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion connect/src/state/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,13 @@ impl<'ct> ConnectState {
tracks
.iter_mut()
.filter(|t| t.metadata.contains_key(METADATA_IS_QUEUED))
.for_each(|t| t.set_provider(Provider::Queue));
.for_each(|t| {
t.set_provider(Provider::Queue);
// technically we could preserve the queue-uid here,
// but it seems to work without that, so we just override it
t.uid = format!("q{}", self.queue_count);
self.queue_count += 1;
});

self.next_tracks = tracks.into();
}
Expand Down

0 comments on commit 232fb60

Please sign in to comment.