Download ranking: multi-disc folders split, single-track Soulseek results dropped, completeness counts files not tracks #270

Closed
opened 2026-09-26 21:05:00 +00:00 by yonlu · 1 comment
Owner

Three faults in how Soulseek results become candidates and how candidates are scored. Found in the same audit as #263.

  1. Multi-disc albums are split in two. groupByFolder groups by the immediate parent, so Album/CD1 and Album/CD2 become two candidates. Each is titled "CD1", each is about 50% complete, and album fit collapses because the folder compared to the album title is "CD1". Such an album essentially never clears auto-pick. The disc number in the folder is lost too, so disc 2's 01 collides with disc 1's 01 in track alignment. collect then stages both discs' files flat, where identical basenames overwrite.
  2. Single-track requests can never be served from Soulseek. Soulseek returns only the files matching the query, so "Artist Title" usually yields one file per folder, and slskdMinFiles = 2 drops every one of those folders.
  3. Completeness counts files, not matched tracks. completeness(len(audio), len(expected)) gives a 10-file folder full marks whether or not the files are the expected tracks. titleFit is the mean over matched files only, so a folder where 3 of 10 titles align scores title fit ≈ 1.0 and completeness 1.0.

Direction

  • Treat a CD1 / Disc 2 / Disk 3-style directory as part of its parent album: group under the parent, parse the disc number from the folder, and keep the disc subfolder in staging.
  • Use a minimum of one file for a request anchored to a recording.
  • Score completeness from files aligned to an expected track, still penalising extras by audio file count.
Three faults in how Soulseek results become candidates and how candidates are scored. Found in the same audit as #263. 1. **Multi-disc albums are split in two.** `groupByFolder` groups by the immediate parent, so `Album/CD1` and `Album/CD2` become two candidates. Each is titled "CD1", each is about 50% complete, and album fit collapses because the folder compared to the album title is "CD1". Such an album essentially never clears auto-pick. The disc number in the folder is lost too, so disc 2's `01` collides with disc 1's `01` in track alignment. `collect` then stages both discs' files flat, where identical basenames overwrite. 2. **Single-track requests can never be served from Soulseek.** Soulseek returns only the files matching the query, so "Artist Title" usually yields one file per folder, and `slskdMinFiles = 2` drops every one of those folders. 3. **Completeness counts files, not matched tracks.** `completeness(len(audio), len(expected))` gives a 10-file folder full marks whether or not the files are the expected tracks. `titleFit` is the mean over *matched* files only, so a folder where 3 of 10 titles align scores title fit ≈ 1.0 and completeness 1.0. ## Direction - Treat a `CD1` / `Disc 2` / `Disk 3`-style directory as part of its parent album: group under the parent, parse the disc number from the folder, and keep the disc subfolder in staging. - Use a minimum of one file for a request anchored to a recording. - Score completeness from files aligned to an expected track, still penalising extras by audio file count.
yonlu added the
Priority
Medium
3
Platform/DesktopKind/BugArea/Downloads
labels 2026-09-26 21:05:00 +00:00
yonlu self-assigned this 2026-09-26 21:05:06 +00:00
yonlu added the
Status
In Progress
label 2026-09-26 21:05:07 +00:00
Author
Owner

Taking this on fix/270-slskd-candidate-shape, stacked on #267 (fix/263) because both edit provider_slskd.go. Approach: disc folders group under their parent, the disc is parsed from the folder, staging keeps the disc subfolder, the minimum is one file for recording requests, and completeness counts aligned tracks.

Taking this on `fix/270-slskd-candidate-shape`, stacked on #267 (`fix/263`) because both edit `provider_slskd.go`. Approach: disc folders group under their parent, the disc is parsed from the folder, staging keeps the disc subfolder, the minimum is one file for recording requests, and completeness counts aligned tracks.
yonlu closed this issue 2026-09-27 01:45:21 +00:00
gitea-actions bot removed the
Status
In Progress
label 2026-09-27 01:47:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#270