fondberg / spotcast

Home assistant custom component to start Spotify playback on an idle chromecast device as well as control spotify connect devices
Apache License 2.0
660 stars 94 forks source link

[Feature Request] Allow setting a private session in the API #242

Closed obbers closed 2 years ago

obbers commented 3 years ago

I stream a lot of Lofi playlists during the day as background noise, but it's definitely affecting my recommendations and new music discoveries. Can the API be upgraded to allow Private Session streaming? The other use case is to allow my kid to pick music and not impact recommendations as well.

fondberg commented 3 years ago

Can you provade me with the api for that using Spotipy or Spotify web api?

fcusson commented 2 years ago

There is no reference for a private session in spotipy documentation (only 4 occurences of the word private and all in reference to a public/private playlist) (verified using spotipy).

The documentation from Spotify's API does refer for a is_private_session() in the in the me/player, but it doesn't seem to be possible to set it, only check it: User Profile API.

Even if we could set it, we could have limitation from doing that. Here is from the documentation in regard of get request for currently or recently played:

If private session is enabled the response will be a 204 NO CONTENT with an empty payload.

fcusson commented 2 years ago

To add to my previous comment. I did some test from my phone and private session is auto turned-off when starting to use spotify connect. (The option is marked unavailable and grayed out in the menu and the api returns false to is_private_session).

fcusson commented 2 years ago

due to the current impossibility to do this in the currently API, i will close this request but add a tag for future possibility