Add Spotify playlist import via OAuth PKCE connection#65
Merged
Conversation
Replace the stub PlaylistImporter with a real Spotify integration: - SpotifyAuthManager: Authorization Code + PKCE flow via Custom Tab, tryptify://spotify-callback deep link, token storage in DataStore, auto-refresh with rotated refresh-token persistence - SpotifyApiClient: playlist metadata/tracks, my-playlists, Liked Songs with pagination, 401 retry-after-refresh, 429 Retry-After handling, and a Development-mode 403 explanation - PlaylistImportService: shared create->match->add pipeline extracted from LibraryViewModel.importCsvPlaylist, now with an observable ImportProgress StateFlow (CSV import gains progress reporting too) - Settings > System: Connect/Disconnect Spotify, playlist URL import, Browse My Playlists picker (incl. Liked Songs), live matching progress and unmatched-track summary - Unit tests for Spotify playlist URL/URI parsing
…Qobuz
- Use GET /playlists/{id}/items (the /tracks endpoint was removed for
Development-mode apps on March 9, 2026 and now returns 403); parse the
renamed item wrapper field while staying tolerant of the old track shape
- Skip the playlist-metadata request when the picker already knows the
name, and treat a metadata failure as non-fatal for URL imports
- Surface Spotify's own 403 error message plus the ownership restriction
(playlist contents are only served for playlists you own or collaborate
on) instead of a generic allowlist hint
- Match imported playlists and Liked Songs against the Qobuz catalog
first (searchQobuz registers ids in QobuzIdRegistry so playback resolves
through the Qobuz source), falling back to Tidal per track
- Remove the always-visible remove button on playlist rows and the per-row delete button on downloads; destructive actions now live in the selection bar and (for playlists) the 3-dot context menu - Long-press any track row to enter selection mode; tap toggles rows, back or X exits, deselecting the last row auto-exits - New TrackSelectionState / TrackSelectionBar components; bar offers Add to queue, Add to playlist, and a context-appropriate Delete: remove from playlist, unlike (favorites), remove from history (recently played), delete downloads; catalog lists (album, artist, search) offer only the send actions - TrackItem and search/download rows show a check indicator and hide per-row buttons while selecting - AddToPlaylistSheet retitled per use (unused track param dropped); bulk add/queue/unlike/history methods on PlayerViewModel, PlaylistViewModel, DownloadsViewModel, LibraryRepository
Sign-in header on the Account screen and the local-music permission prompts still said Monochrome; the app is branded Tryptify everywhere else (launcher label, Home header).
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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.
Replace the stub PlaylistImporter with a real Spotify integration:
tryptify://spotify-callback deep link, token storage in DataStore,
auto-refresh with rotated refresh-token persistence
with pagination, 401 retry-after-refresh, 429 Retry-After handling,
and a Development-mode 403 explanation
from LibraryViewModel.importCsvPlaylist, now with an observable
ImportProgress StateFlow (CSV import gains progress reporting too)
Browse My Playlists picker (incl. Liked Songs), live matching
progress and unmatched-track summary