Skip to content

grouping: do not merge different books that both use CD/ - #42

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-7608
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-7608

Conversation

@cursor

@cursor cursor Bot commented Oct 17, 2026

Copy link
Copy Markdown

Bug and impact

Two mixed torrents that both use an unnumbered disc folder were keyed as that folder and hardlinked to the first match:

  1. Title/CD/ — The Guest/CD/01.mp3 and Along Came a Spider/CD/01.mp3 grouped as CD.
  2. Title/Discs/ (also CDs/, Disc/, Disk/, Disks/) — same collision.

cd1/CD/ and cd2/CD/ also filed into one flat Author/Title/ folder, so the second disc was skipped.

cd1/ / MP3/ / 64k/ wrappers were already walked past (#15 / #20 / #22). Rips that ship tracks under a bare CD/ folder were not.

Root cause

isWrapperFolder only treated codec and bitrate names as wrappers. DISC_FOLDER requires a number (cd1, Disc 01), so groupingName and discFolderFromPath treated CD as the release (or as a non-disc parent, so two discs collided).

Fix

Walk past unnumbered disc folders (CD, CDs, Disc, Discs, Disk, Disks) the same way as MP3/ and 64k/. Numbered discs (cd1/, Disc 01/) and Author/Title grouping are unchanged.

Validation

  • Unit tests for Title/CD, Title/Discs, Author/Title/CD, and cd1/CD vs cd2/CD filing.
  • Existing Release/cd1, Title/MP3, Title/64k and Author/Title cases unchanged.
  • python3 -m unittest discover -s tests -p 'test_*.py': 264 OK.
Open in Web View Automation 

Two releases that both use an unnumbered disc folder (Title/CD/, Title/Discs/)
were keyed as that folder and hardlinked to the first match. cd1/CD/ and cd2/CD/
also collided in a flat Author/Title/ folder, so the second disc was skipped.

Walk past CD/CDs/Disc/Discs/Disk/Disks the same way as MP3/ and 64k/. Numbered
discs (cd1/, Disc 01/) are unchanged.

Co-authored-by: Mancolt <Mancolt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant