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

Update spotify/now/album|playlist to always set AVtransport to queue #791

Closed blixhavn closed 3 years ago

blixhavn commented 3 years ago

I could not get the existing code to properly update the AVtransport to queue, meaning I had the same problem as originally described in issue #390. Forcing the Spotify action to always set this, even if it might already be correct, fixes my problem and doesn't seem to introduce any trouble as far as I can see.

jishi commented 3 years ago

Hm, I find it weird that it would make a difference, unless the "stored" state would somehow be wrong. Every extra call to the players add extra latency and also add potential errors, so it would be nice to understand why this makes a difference to begin with.

blixhavn commented 3 years ago

I'm not particularly familiar with the underlying system, but could it be that the AVTransport is set to an "x-rincon-queue" also when the speaker/player is connected through Spotify Connect?

jishi commented 3 years ago

I'm not particularly familiar with the underlying system, but could it be that the AVTransport is set to an "x-rincon-queue" also when the speaker/player is connected through Spotify Connect?

Ah, yes, that is an excellent point. An alternative approach would be to use a more extensive regex to match for the #0 in the end as well, if one would want to avoid that extra call. But maybe that is overkill. LGTM