spotify-player
spotify-player copied to clipboard
Add automix flag (always play random music from the current playlist)
Hi, I would love to have a flag automix
in the config, which makes it that the next song is truly random. (Same internal handling like sending the command PlayRandom
).
Is your feature already implemented in the latest master
?
No. But there is thou already a PlayRandom
command.
Is your feature request related to a problem? Please describe. Without this feature, spotify_player plays just a mix from the last 50 songs added to my liked playlist.
Describe the solution you'd like
I would like to have a flag automix
added to the config,
This flag should when enabled behave like currently. But when disabled, it should always play a random song from the current playlist.
Describe alternatives you've considered
Pressing PlayRandom
solves this, but it would be nice if it would automatically play a random song.
Without this feature, spotify_player plays just a mix from the last 50 songs added to my liked playlist.
50
comes from tracks_playback_limit
config (https://github.com/aome510/spotify-player/blob/master/docs/config.md#general). You can try to increase the value to allow creating tracks
playback of more songs. Just a note that a big value will not work because there is a limit on number of tracks specified in a tracks
playback API request.
Should have added a note to how tracks_playback_limit
works. In short, the app will pick an interval with at most tracks_playback_limit
songs containing the selected song to start a tracks
playback.
To clarify, tracks
playback is a playback with a bunch of songs unlike context
playback (artist
, playlist
, album
). "liked songs" doesn't count as a playlist. Playing song from "liked songs" page will start a tracks
playback and invoking CurrentlyPlayingContextPage
command will lead you to a cannot determine current page's context
page.
Thanks for the clarification.
This might be a dump question, but why do we use the tracks
playback, which creates a subset of songs as I understand, instead of picking random songs from the page (e.g. Liked Songs) where they don't provide a context
playback? Wouldn't this solve the limitation of the Spotify API, that we can only create tracks
playback with up to 100 songs?
This might be a dump question, but why do we use the
tracks
playback, which creates a subset of songs as I understand, instead of picking random songs from the page (e.g. Liked Songs) where they don't provide acontext
playback?
The main reason is to avoid possible confusion when user doesn't have shuffle on.
Wouldn't this solve the limitation of the Spotify API, that we can only create tracks playback with up to 100 songs?
Not really as the playback still contains a subset of the liked songs, e.g if you listen for a long time, it will loop between pre-selected 100 songs.
automix
behaviour can be supported by implementing a custom logic to invoke tracks
playback by "batches". For example, after finish playing a 50-song playback, the app will pick another "batch" of 50 songs to start the next tracks
playback.
The main reason is to avoid possible confusion when user doesn't have shuffle on.
I would think mixauto
would only apply when shuffle is enabled. When not shuffling, we just have an ordered playback.
Not really as the playback still contains a subset of the liked songs, e.g if you listen for a long time, it will loop between pre-selected 100 songs.
Yes, but wouldn't it always be the same 100 songs, just ordered differently?
E.g. having a tracks_playback_limit
of 1 will always result in the same song.
automix behaviour can be supported by implementing a custom logic to invoke tracks playback by "batches". For example, after finish playing a 50-song playback, the app will pick another "batch" of 50 songs to start the next tracks playback.
This would also be a great feature to have.
I am not a rust dev, but I can look into it.
Yes, but wouldn't it always be the same 100 songs, just ordered differently? E.g. having a tracks_playback_limit of 1 will always result in the same song.
Yeah, exactly =).
I am not a rust dev, but I can look into it.
Great! Lmk if you have a PR up. It's always good to learn Rust IMO 😎
+1, it's very annoying that shuffle only plays songs from around the one I select manually