Feature/import playlist - #234
Open
dgloukhman wants to merge 4 commits into
Open
Conversation
added 4 commits
August 20, 2026 15:44
- Add playlist-modify-public and playlist-modify-private OAuth scopes - Add rate-limited apiPost wrapper in helpers - Register faFileImport icon - Implement RFC 4180 CSV parser for extracting Spotify track URIs/IDs - Add cache invalidation method to PlaylistsData - Implement PlaylistImportService with track batching and multi-playlist support
Add translation strings for import playlist button, modal dialogs, status messages, and errors across Arabic, German, Greek, English, Spanish, French, Italian, Japanese, Dutch, Portuguese, Swedish, and Turkish.
- Add PlaylistImporter supporting single and multi-file CSV selection - Add ImportPlaylistModal supporting multi-file itemized preview, inline editing, and privacy configuration - Include unit tests for modal and file importer workflows
…istTable - Embed PlaylistImporter into PlaylistTable action bar next to Export All - Display real-time progress and completion/error alerts for imports - Reset table pagination to page 1 upon successful import - Update PlaylistTable tests and snapshot
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 the ability to import Spotify playlists directly from CSV files (both Exportify exports and custom CSVs containing Spotify Track URIs or IDs). Supports single and multi-file selection, pre-import preview with inline editing, track chunking, rate-limited API batching, and full internationalization across all 12 locales. Code has been generated AI-assisted and manually tested for correct functionality.
Key Changes
1. Data Layer & Utilities
src/utils/csvParser.ts): Robust CSV parsing extractingTrack URI,Spotify URI,Track ID, or URI-like fields handling quotes, commas, and multiline values.src/helpers.ts): Wrapped POST requests with the existing Bottleneck limiter to prevent Spotify API rate-limit errors.src/components/data/PlaylistImportService.ts): Creates playlists (POST /v1/me/playlists) and uploads tracks in chunks of 100 (POST /v1/playlists/{id}/items) with sequential processing for multiple files and progress callbacks.src/auth.ts): Addedplaylist-modify-publicandplaylist-modify-privatescopes.2. UI Components
PlaylistImporter: File picker button supporting single and multi-file drag/select with CSV parsing and error handling.ImportPlaylistModal: Modal dialog displaying an itemized summary of playlists and track counts. Supports inline playlist renaming, per-item removal, and a public/private toggle (defaults to private).PlaylistTableIntegration: Placed the Import button in the table toolbar alongside "Export All", displaying live progress badges and completion alerts, invalidating the playlist cache, and resetting pagination upon completion.3. Internationalization (i18n)
ar,de,el,en,es,fr,it,ja,nl,pt,sv,tr).Test Plan
csvParser.test.ts).PlaylistImportService.test.ts).ImportPlaylistModal.test.tsx,PlaylistImporter.test.tsx).PlaylistTable.test.tsx).npm test(49/49 passing) andnpm run buildpass cleanly with zero warnings/errors.