Skip to content

Add Spotify playlist import via OAuth PKCE connection#65

Merged
tryptz merged 4 commits into
mainfrom
claude/spotify-playlist-import-yxpf50
Jul 5, 2026
Merged

Add Spotify playlist import via OAuth PKCE connection#65
tryptz merged 4 commits into
mainfrom
claude/spotify-playlist-import-yxpf50

Conversation

@tryptz

@tryptz tryptz commented Jul 5, 2026

Copy link
Copy Markdown
Owner

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

tryptz added 4 commits July 4, 2026 22:20
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).
@supabase

supabase Bot commented Jul 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project lvzorvfhhopillzlwgau because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@tryptz tryptz merged commit 585cfb9 into main Jul 5, 2026
5 checks passed
@tryptz tryptz deleted the claude/spotify-playlist-import-yxpf50 branch July 5, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant