Repository navigation
Export saved albums - #240
Merged
Merged
Conversation
Add a Saved Albums row under Liked Songs, hidden when there are none, whose export downloads saved_albums.csv with one line per album. Export All includes it in the zip. Strings are English only for now. Builds on #216. Co-authored-by: Rylie Nelson <5449165+ryliemn@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The album count is the app's first plural key, so the locale test compares keys without their plural suffix: Arabic needs six forms, Japanese one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bar's maximum was the playlist count, which leaves out Liked Songs and Saved Albums, so it filled up and stopped animating before the last files were exported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Users who save albums rather than build playlists couldn't export anything (#18). This adds a "Saved Albums" row directly under Liked Songs. It has a vinyl icon, and the Tracks column shows the album count, e.g. "312 albums". The row is hidden when the account has no saved albums, and it's on the first page only and not in search results, as Liked Songs is.
Builds on #216 by @ryliemn, which first exported saved albums as one line per album in
saved_albums.csv.The row's Export button downloads
saved_albums.csv, one line per album in Spotify's order (most recently saved first), with these columns: Album URI, Album Name, Album Artist URI(s), Album Artist Name(s), Album Type, Album Release Date, Total Tracks, Label, UPC, Popularity, Album Image URL, Added At. Quoting and\,artist-name escaping match the track export, and the columns it shares with the track export use the same names. "Export All" addssaved_albums.csvtospotify_playlists.zip. The export settings (artists, audio features, album data) don't apply to it.How it works:
PlaylistsDatagets the count fromGET /me/albums?limit=1on load, as it does for Liked Songs, and adds aSavedAlbumsPlaylistentry after Liked Songs. Itsalbumsfield takes the place oftracks, so"albums" in playlisttells the two kinds apart in the type system rather than by another id check.SavedAlbumsExporterpages through/me/albums?limit=50withapiCall, so the limiter, retries and token refresh apply. The row and Export All use it for that entry, so progress and API errors are handled the same way as for playlists.TracksPlaylist(playlists and Liked Songs). Nothing else in it has changed.user-library-readalready covers/me/albums.🤖 Generated with Claude Code + hand edit