fix(worker): retrieve Soulseek downloads from slskd's dir into staging
SlskdClient enqueued the transfer and polled to Completed but never moved any
files into `dest` — slskd saves them to its OWN downloads dir, so staging stayed
empty and every Soulseek job failed "incomplete download". Qobuz/YouTube write
straight into staging and were unaffected.
- SlskdClient._retrieve() moves the finished files out of slskd's downloads dir
into staging after completion, matching tolerantly by basename and preferring
a parent-folder + size match (slskd's on-disk layout varies by version).
- download() returns the moved count as track_count so the pipeline's
completeness check reflects what actually landed; raises loudly if nothing was
found (misconfigured/unmounted downloads dir).
- Downloads dir resolves slskd.downloadsDir Config > SLSKD_DOWNLOADS_ROOT env >
/slskd-downloads default; docker-compose mounts ${SLSKD_DOWNLOADS_DIR} there.
- .env.example documents SLSKD_DOWNLOADS_DIR; retrieval unit-tested offline.
slskd runs as an external daemon, so the shared dir must be a host path both
slskd and the worker mount — set once Lyra runs on the slskd host. Not yet
verified live end-to-end (no slskd access from this VM).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,3 +14,10 @@ MUSIC_DIR=./music
|
||||
# share (SMB/NFS) so temporary downloads don't hammer the share; the final import copies the
|
||||
# finished album onto the library volume and swaps it in atomically.
|
||||
# STAGING_DIR=/srv/lyra-staging
|
||||
|
||||
# Host directory where slskd (the external Soulseek daemon) writes FINISHED downloads,
|
||||
# bind-mounted into the worker at /slskd-downloads. The worker moves completed Soulseek
|
||||
# transfers out of here into staging, so this MUST be the same directory slskd downloads to.
|
||||
# Set this only once Lyra runs on the same host as slskd; until then Soulseek can search but
|
||||
# not deliver. Defaults to ./slskd-downloads (an empty local dir) so the stack still starts.
|
||||
# SLSKD_DOWNLOADS_DIR=/var/lib/slskd/downloads
|
||||
|
||||
Reference in New Issue
Block a user