Add add_to_queue to Spirc#1676
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a public API method add_to_queue to the Spirc struct, allowing programmatic addition of tracks to the playback queue. This complements the existing internal queue handling that occurs when receiving AddToQueue commands from the Spotify Connect protocol.
Changes:
- Added
add_to_queuepublic method toSpircfor adding tracks to the queue via URI - Added
AddToQueuevariant to internalSpircCommandenum - Added
handle_add_to_queuehelper method to process queue additions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| connect/src/spirc.rs | Implements the new add_to_queue public API method, command enum variant, command handler, and internal handler function |
| CHANGELOG.md | Documents the new feature addition in the unreleased section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
photovoltex
left a comment
There was a problem hiding this comment.
Nice going. Just a single comment what could be improve on.
In order to reflect what the official apps are offering to the user.
|
@photovoltex I spontaneously added |
|
I think the event is misplaced in the player, but then again, so is shuffle, repeat and autoplay as they are all related to the And I'm fine with adding the event as it doesn't inflate the PR to much and is still in context in my opinion. |
photovoltex
left a comment
There was a problem hiding this comment.
Looks good, just update the docs for add_to_queue so that we know which item types are supported from the outside. And remove the two types in handle_add_to_queue, then this should be ready to merge.
Unless you add something again xd
|
@photovoltex with docs for Missed some more places that were fixed in 5b3aebd. |
photovoltex
left a comment
There was a problem hiding this comment.
LGTM, will merge it in the afternoon :)
|
Thanks again for taking on the issue :D |
|
My pleasure! Thank you for the constructive feedback, help and patience. The rust community feels like a very friendly place. 😀 |
Add `add_to_queue` to `Spirc` (librespot-org#1676)
Add
add_to_queuetoSpirc.Fixes #1453