forked from Furumi/furumi-web
Import Spotify data exports and optionally playlists from the Spotify Web API
Add the Spotify adapter to the library import. The data export path parses Playlist*.json and YourLibrary.json sent by the browser, tolerates missing and unexpected keys, keeps the source order and repeats, and stores episodes, audiobooks, local files and unreadable entries as unsupported instead of dropping them. The bundled export fixture is synthetic and must be joined by an anonymized real export before acceptance. POST /api/imports/preview lists the playlists of an upload and marks those already imported or similar to an earlier import; POST /api/imports stores the selected playlists with every entry in one transaction and starts the worker. Requests are JSON-only and limited to 32 MiB (413). Re-import is detected per source playlist: a repeat is refused with 409, and a changed playlist with the same title needs confirm_similar. The Spotify Web API is optional and enabled by an administrator's client ID (and redirect URI behind a proxy) in the settings. Sign-in uses PKCE with the state, verifier and waiting import kept in the session; access tokens stay only in an in-memory vault for at most 30 minutes. The worker fetches the selected playlists one by one, honors Retry-After and backs off on server errors. A missing or expired token parks the import as needs_reauth; signing in again with the same account continues the same import and skips the playlists already fetched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
097812a845
commit
ff87d9110d
20 files changed
+4176
-52
No files matched your search
@@ -6,15 +6,14 @@
|
||||
//! rest of Furumi only when publishing: target playlists, their tracks and the
|
||||
//! existing Device Sync operations.
|
||||
|
||||
// Imports are created by the provider integrations and processed by the
|
||||
// resolver and publisher; until those are wired in, parts of the model and
|
||||
// the creation path are used by the tests only.
|
||||
#[allow(dead_code)]
|
||||
// Imports are processed by the resolver and publisher; until those are wired
|
||||
// in, parts of the model and the storage layer are used by the tests only.
|
||||
pub mod adapters;
|
||||
mod handlers;
|
||||
pub mod job;
|
||||
#[allow(dead_code)]
|
||||
pub mod model;
|
||||
pub mod providers;
|
||||
#[allow(dead_code)]
|
||||
pub mod store;
|
||||
|
||||
|
||||
Reference in new issue
Block a user