Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding addtoqueue API call #766

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

adding addtoqueue API call #766

wants to merge 2 commits into from

Conversation

barrydegraaff
Copy link

addtoqueue (beta)

Add track to the current queue of specified player. You can obtain track uri from /favorites/detailed call. When using Sonos music library (CIFS) and know the path of a song you can construct the uri by using encodeURIComponent. The request will accept:

  • uri (required,
  • enqueueAsNext (boolean, required)
  • desiredFirstTrackNumberEnqueued (optional)

Examples:

  • http://localhost:5005/living room/addtoqueue/x-file-cifs%3A%2F%2F10.10.1.77%2Fpublic%2FJames%20Bond%20Soundtracks%2F02.%20From%20Russia%20With%20Love%2F07%20-%20007.mp3/true/1
  • http://localhost:5005/living room/addtoqueue/x-sonos-spotify:spotify%3atrack%3a4BggEwLhGfrbrl7JBhC8EC?sid=9&flags=8224&sn=2/true/1

addtoqueue works with Sonos music library (CIFS) and works partially with Spotify. Added songs from Spotify will display correct album art, but display song id instead of song title.

Example addtoqueue response:

[
    {"firsttracknumberenqueued":"4","numtracksadded":"1","newqueuelength":"4"}
]

Feedback on how to fix the song title for Spotify is welcome. There should be a way to specify the metadata in the player.coordinator.addURIToQueue call. But have not found a good way for it yet.

@jsiegenthaler
Copy link
Contributor

Hi @jishi : any chance some of these improvements to the api could be merged to the master?

@koppenho
Copy link

koppenho commented Mar 6, 2022

ME-TOO: I also would like to see the new features get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants