Repository navigation
Add opt-in album downloads for slskd - #4
Merged
Merged
Conversation
Set SLSKD_ALBUM_MODE=true and slskd fetches the whole release the recommended track belongs to, rather than that track alone. Off by default: it multiplies transfer volume per recommendation, and existing setups should not change behaviour on upgrade. How it works. QueryTrack searches "<artist> - <album>" instead of "<track> - <artist>", falling back to the track when the recommendation carries no album. GetTrack then groups results by peer and directory, which is the closest thing Soulseek has to a release, and picks the best candidate: it must contain the recommended track, a directory naming the album beats one that merely contains the track, and among equals the fuller release wins. Every file goes to slskd in a single request, since the downloads endpoint already takes an array. Two filters are deliberately not applied to sibling tracks. The ten-second duration check is meaningful only for the recommended track, and FILTER_LIST is matched against the directory instead, so a live pressing is rejected as a release rather than one track at a time. Only the recommended track enters the playlist. Explo builds a discovery list, and a dozen album tracks per recommendation would bury it. The rest simply land in the library. track.File still points at the recommended track, so MonitorDownloads needs no changes. Siblings ride along in track.AlbumFiles and are migrated once the primary is moved, skipping any that slskd has not finished -- copying a file mid-transfer would put a truncated track in the library. Migration hangs off an optional albumMigrator interface rather than MoveDownload reaching for a concrete downloader. Youtube grabs a single file and simply does not implement it. The hook runs after the primary is removed and before the empty-directory check, so a directory still holding an unfinished album track survives to be cleaned up on a later pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 30, 2026
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
SLSKD_ALBUM_MODE. With it on, slskd fetches the whole release the recommended track sits in rather than that track alone. Off by default — it multiplies transfer volume per recommendation, and existing setups should upgrade with identical behaviour.Independent of #2 and #3; branches straight off
dev.Behaviour when enabled
<main artist> - <album>, falling back to the track when the recommendation has no album metadata. The existing wildcard retry still applies.FILTER_LISTmatches the directory, so a live or remix pressing is rejected as a release rather than one track at a time. Bitrate and bit-depth floors apply to siblings but not to the recommended track — a mediocre file in the playlist beats an empty slot.Succeededare moved across; anything still transferring is left in place rather than copied truncated.Design notes
track.Filestill points at the recommended track, soMonitorDownloadsneeds no changes. Siblings ride along in a newTrack.AlbumFiles.Sibling migration hangs off an optional
albumMigratorinterface rather thanMoveDownloadreaching for a concrete downloader; youtube grabs a single file and simply doesn't implement it. The hook runs after the primary is removed and before the empty-directory check, so a directory still holding an unfinished album track isn't deleted out from under it.Testing
go build,go vetandgo test ./src/downloader/...pass. Coverage: release selection, album-vs-track directory preference, requiring the recommended track, filtered-release rejection, duration check not applied to siblings, single-request queueing, search-term fallback, Windows path grouping, sibling migration skipping unfinished transfers, and the migration being inert with album mode off.The
src/webpackages fail to build for want ofdist/*; that is pre-existing ondevand unrelated.🤖 Generated with Claude Code