Repository navigation
grouping: do not merge different books that both use Audiobook/ - #34
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
#15/#20/#22 walked past cd1/, MP3/ and 64k/, but two mixed torrents that both use Title/Audiobook/ or Title/Unabridged/ were still keyed as "Audiobook" and hardlinked to the first match. Walk past those kind folders. Filing also walks past Audiobook/ under a disc so cd1/Audiobook/ and cd2/Audiobook/ get distinct subfolders. 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 a kind folder were keyed as that folder and hardlinked to the first match:
Title/Audiobook/—The Guest/Audiobook/book.m4bandAlong Came a Spider/Audiobook/book.m4bgrouped asAudiobook.Title/Unabridged/(alsoAUDIOBOOKS/,Audio Books/,Graphic Audio/) — same collision.cd1/Audiobook/andcd2/Audiobook/also filed into one flatAuthor/Title/folder, so the second disc was skipped.cd1//MP3//64k/wrappers were already walked past (#15 / #20 / #22). Mixed MAM torrents that shipAudiobook/next toeBook/were not.Root cause
isWrapperFolderonly treated codec and bitrate names as wrappers.groupingNameanddiscFolderFromPaththen treatedAudiobookas the release (or the disc).Fix
Walk past kind folders (
audiobook(s),audio book(s),unabridged,abridged,dramatized/dramatised,graphic audio) the same way asMP3/and64k/. Author/Title and loose-file grouping is unchanged.Validation
Title/Audiobook,Title/Unabridged,AUDIOBOOKS,Audio Books,Graphic Audio, Author/Title/Audiobook, andcd1/Audiobookvscd2/Audiobookfiling.Release/cd1,Title/MP3,Title/64kand Author/Title cases unchanged.python3 -m unittest discover -s tests -p 'test_*.py': 223 OK.