forked from Furumi/furumi-web
Add the Import library page and wizard to the web player
Import library sits between Followed and Settings in the account menu and opens #imports: the sources, the history with statistics and links to the created playlists, and #imports/N with progress, per-playlist results, a deleted-playlist notice with Create again, and the entries with status and playlist filters, search, paging and the candidates of doubtful entries to choose from. Retry unmatched (with the federated search consent), Cancel, Delete history and a new Spotify sign-in for waiting imports call the existing /api/imports endpoints. The page polls every 3 s while an import runs. It follows the player's views, skeletons, dialogs, switches and phrase table in English and Russian. The New import wizard picks a source, then the data export or the Spotify sign-in, then the playlists: imported ones cannot be selected, similar ones need an explicit confirmation, and federated search is off until the user turns it on. A ZIP export is opened in the browser with fflate 0.8.2, vendored with its MIT licence and served at /vendor/fflate-0.8.2.js only when an archive is picked. Only Playlist*.json and YourLibrary.json are extracted; archives over 256 MiB, with more than 2,000 entries, more than 256 playlist files or more than 32 MiB declared for them are refused before anything is decompressed, and a request over 32 MiB is not sent. Federated tracks can now be removed from a playlist in edit mode: DELETE /api/player/tracks/content/playlist checks the owner and records the existing PlaylistTrackRemoved operation. The body-level dialogs get an Alpine root, which also makes Get app open again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4d6a1513d9
commit
d275e7326b
21 files changed
+2421
-14
No files matched your search
+11
-4
@@ -101,11 +101,18 @@ its destination for its remaining files.
|
||||
|
||||
## Spotify library import
|
||||
|
||||
Users start an import from **Import library** in the account menu. The page
|
||||
lists the available sources, the history of imports with their statistics and
|
||||
links to the created playlists, and the entries of each import.
|
||||
|
||||
Spotify playlists and Liked Songs are imported from the account data export
|
||||
("Download your data") without any server configuration. The browser sends
|
||||
only `Playlist*.json` and `YourLibrary.json`; the server parses them in memory
|
||||
and stores the entries of the selected playlists. An import request may not
|
||||
exceed 32 MiB. Importing a playlist a second time is refused; a playlist with
|
||||
("Download your data") without any server configuration. The browser opens the
|
||||
ZIP archive itself and sends only `Playlist*.json` and `YourLibrary.json`;
|
||||
listening history and account details never leave it. Before anything is
|
||||
decompressed the browser refuses archives over 256 MiB, archives with more than
|
||||
2,000 entries, more than 256 playlist files, or playlist files declaring more
|
||||
than 32 MiB in total. The server parses the files in memory and stores the
|
||||
entries of the selected playlists. An import request may not exceed 32 MiB. Importing a playlist a second time is refused; a playlist with
|
||||
the same title and changed contents is imported as a new playlist only after
|
||||
confirmation.
|
||||
|
||||
|
||||
Reference in new issue
Block a user