Repository navigation
Conversation
Smart Shuffle loads the playlist through context-resolve with ?spotify-apply-lenses=enhance, which adds Spotify's recommendations to it. Switching it on or off reloads the playing playlist from the playing row (found by uid, since the two forms of the context can give a relinked track different ids). The queue marks recommended tracks. Remote devices keep plain shuffle: the lens can't be passed to them.
…yer menus The shuffle button cycles off, shuffle and Smart Shuffle (skipped where it isn't available) and shows a sparkle in Smart Shuffle. Recommended tracks get a sparkle in the queue. The icon font gains auto_awesome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Spotify's Smart Shuffle for playlists played on this computer.
Smart Shuffle is the playlist loaded through context-resolve with
?spotify-apply-lenses=enhance. Spotify then returns the playlist plus its recommendations, marks the context withenhanced_context=trueand each added track withprovider=enhanced_recommendation. librespot loads that URI as is, so nothing changes on the librespot side. The lens only works as a query parameter, sending it as a header to context-resolve does nothing.auto_awesomeonly. Regenerating the whole subset also changed a few unrelated glyphs, so I left those out.Limits:
shuffle.distributionin the track metadata).Tested on Linux with a Premium account: two playlists (220 to 286 and 30 to 45 tracks), switching on and off mid track, the queue marks.
cargo test --locked -p sf-player -p md3-model -p mf-i18nand qmllint pass.