Repository navigation
Conversation
The history already merges this computer's plays with Spotify's recently played, but only the home shelf showed it. The new page lists it by day: songs played in a row from one playlist, album or artist are one row with their count, and a song played on its own is its own row. A context row opens it, a song row plays it. It sits in the sidebar under New releases.
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.
The history already merges this computer's plays with Spotify's recently played, but only the home shelf showed it, so there was no place to see what you played yesterday the way the phone's Recents does.
This adds a Recents page in the sidebar, under New releases. It lists the history by day (Today, Yesterday, then the date). Songs played in a row from one playlist, album or artist are one row with their count ("Relaxar · Playlist · 34 tracks"), and a song played on its own is its own row. A context row opens it, a song row plays it. The page reloads when the history changes.
The grouping is a pure function (
data::recents::by_day) with tests for days split by local time and for the same playlist coming back later.Tests:
cargo test -p sf-services recents, qmllint on RecentsPage.qml, and the page loaded offscreen on a real account.Update: the page shows Spotify's own recently played list (the same one the phone uses) together with this computer's plays, which only reach Spotify when play reporting is on; the same play shows once. It refreshes about 15 seconds after a song ends here. Clicking a playlist, album or artist row expands the songs that played in it that day instead of opening the context; the songs come from this computer's plays plus /me/player/recently-played when the Web API is signed in.