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

Add shuffle and other options to media browser #315

Open
bernikr opened this issue Apr 1, 2022 · 5 comments
Open

Add shuffle and other options to media browser #315

bernikr opened this issue Apr 1, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request v5 Will be worked on in v5

Comments

@bernikr
Copy link

bernikr commented Apr 1, 2022

I really like that the usage of this integration improved drastically with the new media browser. However, I find myself still using the old spotcast.start service because I want to shuffle a playlist. I think if the there was a way to set the "shuffle", "random songs" and other flags through the media browser, the usability would improve even more.

@fcusson fcusson added the enhancement New feature or request label Apr 7, 2022
@fcusson
Copy link
Collaborator

fcusson commented Apr 23, 2022

This is sadly a limitation on home assistant side. Not possible to implement because the media selector doesn't have hooks for shuffle and random songs (for all I know, the documentation is very lacking for this feature).

Even then, the shuffle toggle would have to be implemented from the Spotify integration directly, not Spotcast

@hmmbob
Copy link
Contributor

hmmbob commented Apr 23, 2022

@fcusson
Copy link
Collaborator

fcusson commented Apr 23, 2022

@hmmbob the media_player does provide a way to shuffle directly from media_player.spotify, but the media_selector currently doesn't have the button for it. We only have access to async_browse_media and async_play_media. No argument can be passed to play_media and the media_selector only has a simple play button, no way to select to shuffle.

Unless I'm missing something in the documentation, but the only hook we have is the async_play_media.

Technically, we can modify the method to shuffle the media source, but that would be hardcoded and not something the user can choose.

That leaves us with hardconding the shuffle and random_song arguments or calling the service. We must ask ourselves:

  1. Should shuffle be the default playback method or ordered should?
  2. Could we parse per media_type and say per exemple, album is ordered but playlist shuffle?

The important part to take into account is that we would be forcing this behavior on all the users

@hmmbob
Copy link
Contributor

hmmbob commented Apr 23, 2022

Hmmm, too bad. Saw this in the code, so hoped it would be available for use.

I don't think existing behavior should change.

@Silther
Copy link

Silther commented Sep 24, 2023

With mushroom cards it's a little buggy but works.

@fcusson fcusson added the v5 Will be worked on in v5 label Dec 10, 2024
@fcusson fcusson self-assigned this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v5 Will be worked on in v5
Projects
None yet
Development

No branches or pull requests

4 participants