Repository navigation
grouping: do not merge different books that both use CD/ - #42
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
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>
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.
Bug and impact
Two mixed torrents that both use an unnumbered disc folder were keyed as that folder and hardlinked to the first match:
Title/CD/—The Guest/CD/01.mp3andAlong Came a Spider/CD/01.mp3grouped asCD.Title/Discs/(alsoCDs/,Disc/,Disk/,Disks/) — same collision.cd1/CD/andcd2/CD/also filed into one flatAuthor/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 bareCD/folder were not.Root cause
isWrapperFolderonly treated codec and bitrate names as wrappers.DISC_FOLDERrequires a number (cd1,Disc 01), sogroupingNameanddiscFolderFromPathtreatedCDas 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 asMP3/and64k/. Numbered discs (cd1/,Disc 01/) and Author/Title grouping are unchanged.Validation
Title/CD,Title/Discs, Author/Title/CD, andcd1/CDvscd2/CDfiling.Release/cd1,Title/MP3,Title/64kand Author/Title cases unchanged.python3 -m unittest discover -s tests -p 'test_*.py': 264 OK.