feat(downloader): add SpotiFLAC as a download source#194
Conversation
Add a 'spotiflac' download service that fetches lossless FLAC via the SpotiFLAC python module (deezer/tidal/qobuz/amazon, in priority order), mirroring the existing youtube_music subprocess pattern. Tracks are resolved by ISRC with a title/artist search fallback; downloads run synchronously and degrade gracefully so other DOWNLOAD_SERVICES take over when a track can't be sourced. - src/downloader/spotiflac.go: Downloader implementation (no queue monitoring) - src/downloader/spotiflac/spotiflac_dl.py: bundled wrapper around the module - src/config/config.go: SPOTIFLAC_* options + DownloadConfig wiring - src/downloader/downloader.go: register service in factory + needsDownloadDir - Dockerfile: pip install SpotiFLAC + bundle the wrapper script - sample.env, src/web/sample.env, README: document the new source
…dule version - spotiflac_dl.py: use download_track_async (SpotiFLAC >=1.2.1), falling back to download_track (<=1.2.0) - Dockerfile: install the module via a SPOTIFLAC_VERSION build arg (default 1.2.1), pulled from the project's matching GitHub version-branch archive since 1.2.1 restored the upstream endpoint registry and is not on PyPI yet - sample.env / src/web/sample.env: document the >=1.2.1 requirement and the build arg Verified end-to-end: a real FLAC downloads via Deezer through the Go downloader.
…1.2.3 Migrate the spotiflac source to SpotiFLAC 1.2.3, installed from PyPI (which ships the `spotiflac` CLI alongside the importable module). The downloader now serves all Explo flows via two paths: - Tracks with a streaming URL (Spotify-imported playlists) download through the official `spotiflac` CLI, matching the exact track. The Spotify import path now captures each track's URL (partner API `uri`) and threads it through the import -> cache -> run pipeline onto models.Track.SourceURL. - Tracks matched only by metadata (ISRC or title/artist, e.g. ListenBrainz discovery) download through the bundled module helper (spotiflac_dl.py), which searches each FLAC provider by ISRC with a title/artist text-search fallback, mirroring how the youtube service shells out to ytmusicapi. Either path tries the configured sources in priority order; tracks SpotiFLAC cannot source fall through to the other DOWNLOAD_SERVICES. - Dockerfile installs SpotiFLAC from PyPI and bundles the helper. - Config: SPOTIFLAC_BIN (CLI), SPOTIFLAC_PYTHON_PATH/SPOTIFLAC_SCRIPT_PATH (helper), plus SPOTIFLAC_SOURCES/QUALITY/TIMEOUT/RETRIES.
|
Awesome work, just confirming that it works for me too. Pretty sweet stuff since using it with a VPN basically removes all rate-limiting 😄 |
|
Yeah, please test it out, although the stability is dependant on the SpotifyFlacModule project.. There are times it's unstable but does get fixed pretty quickly by the maintainer |
Add NetEase and JOOX to the SpotiFLAC provider chain. Both are credential-free lossless sources (available since SpotiFLAC 1.3.x) and cover many tracks the Western services (deezer/tidal/qobuz/amazon) miss. - config.go: append netease,joox to the default SPOTIFLAC_SOURCES - spotiflac_dl.py: mirror the default in the module-helper fallback - spotiflac.go: update the provider list in the doc comment - sample.env: document the expanded default + supported providers - Dockerfile: always install the latest SpotiFLAC so new providers (netease/joox) ship without a manual version bump
feat(spotiflac): add netease & joox FLAC data sources
|
Hey, thanks for the work! Was testing this a while ago, but the first song it downloaded was a bass boosted remix version of Killing In The Name by Rage Against the Machine I imported a custom spotify playlist, so the sourceURL was correct, I doubt the song downloaded even exists in spotify. Can there be more logging added? i.e what provider was the track downloaded from (maybe the artist and track name from the provider if spotiflac sends it) I want to look into this myself as well (when I have time), to see how the spotiflac module works exactly, The other 10 songs downloaded nicely |
Adds a
spotiflacdownload service for pulling tracks as lossless FLAC.Depending on what info Explo has for a track, it uses one of two paths:
spotiflacCLI.Both try the configured providers in order (deezer, tidal, qobuz, amazon). Anything that can't be found is skipped, so the other services in
DOWNLOAD_SERVICESstill get a turn.To capture the URL for the first path, the Spotify import now reads each track's link from the partner API and carries it through to the downloader.
Config is documented in
sample.env:SPOTIFLAC_SOURCES,SPOTIFLAC_QUALITY,SPOTIFLAC_BIN,SPOTIFLAC_PYTHON_PATH,SPOTIFLAC_SCRIPT_PATH,SPOTIFLAC_TIMEOUT,SPOTIFLAC_RETRIES. The docker image installs SpotiFLAC from PyPI (which gives both the CLI and the importable module) and copies in the helper script.Tested locally with mpd: downloaded FLACs through both paths and checked they decode cleanly with ffmpeg.
Tested with Spotify Playlist imported via Explo
I'm into very obscure music and I KNOW I'M GONNA HATE FOR THIS BUT I LIKE SOME OF THE AI MUSIC especially RnB and spotify's algorithm prioritizing AI artists is getting to me so I want FLAC files. Most of the FLACs I get are from Deezer
Example logs from Explo when pulling the FLAC file from SpotiFLAC
Refs #117