jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.83k stars 462 forks source link

adding addtoqueue API call #766

Open barrydegraaff opened 3 years ago

barrydegraaff commented 3 years ago

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:

Examples:

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 commented 3 years ago

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

koppenho commented 2 years ago

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