thlucas1 / spotifyplus_card

Home Assistant UI card that supports features unique to the SpotifyPlus custom integration.
MIT License
8 stars 1 forks source link

Is there a way to see the Spotify play queue on the card? #13

Closed ovizii closed 3 weeks ago

ovizii commented 1 month ago

Checklist

Is your feature request related to a problem? Please describe.

Sometimes I like to peek ahead :-) Of course if one could edit the queue that would be even more awesome.

Describe the solution you'd like

I'd love to see the queue at least. If I can remove single songs from it or maybe even add certain songs to it that would be amazing.

Describe alternatives you've considered

Edit the queue on the android spotify app, but that is an additional device and step to take.

Additional context

Great work!

thlucas1 commented 4 weeks ago

Will be added with the next release. New configuration option will be located under the "Player Controls" options.

I still need to think about the addition and removal of items logic / scenarios. This will at least get you some details to look at.

[ 1.0.9 ] - 2024/10/28

Added playerControlsHidePlayQueue config option to enable / disable play queue information area.

Will look like this ...

Player Queue Info - Tracks

player_queue_info_tracks

Player Queue Info - Podcast Episodes

player_queue_info_podcasts

thlucas1 commented 3 weeks ago

The Spotify Web API does not provide methods to remove items from the queue, nor clearing of the queue. The only method they provide for queue support is adding items to the queue. It's quite odd, as the Spotify web-site allows you to do all of those things. I don't know why they did not provide endpoints for the other functions. There have been several requests out on their community forum for these functions, but no progress as of yet (some of those have been opened for years!). Here's an example of 1 such request - there are many duplicates on the community forum.

I should be able to add the "Add to Queue" support, as that endpoint exists and is already part of the spotifywebapiPthon package that the SpotifyPlus Card uses.

Will keep you posted.

thlucas1 commented 3 weeks ago

Released v1.0.9, which fulfills part of this request.

ovizii commented 3 weeks ago

Thanks looks nice, at least one can peek ahead now. Unfortunately, a click on a queue item, does not skip forward but rather starts a new queue with exactly that one item :-/ meaning playing will stop after that one item.

thlucas1 commented 3 weeks ago

Yes, I noticed that too in my testing. The Spotify clients (desktop and web) do the same thing as well most of the time. In my testing it was hit and miss - sometimes it would backfill other songs in the queue, sometimes it would not.

Unfortunately Spotify does not provide any endpoints in its web API to control queue operations, except for adding items to it. And even then, you could add a bunch of items to the queue then erase them all by clicking play on a single track.

I wish the Spotify api had better support for queue operations.