grouping: do not merge different books that both use MP3/ - #20
Merged
Merged
Conversation
#15 walked past cd1/MP3/ but treated Title/MP3/ as the release, so two downloads that both used a codec folder were keyed as "MP3" and hardlinked to the first match. Walk past FORMAT_FOLDER always. Filing also uses the disc parent of cd1/MP3/ so the second disc is not skipped. 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 releases that both use a codec folder (
The Guest/MP3/,Along Came a Spider/MP3/) were grouped as one book namedMP3and hardlinked to the first match. A multi-disc layoutTitle/cd1/MP3/01.mp3+Title/cd2/MP3/01.mp3(already grouped as one book since #15) was filed into a flatAuthor/Title/folder, so the second disc's same-named tracks were silently skipped.Root cause
groupingName(PR #15) walked pastFORMAT_FOLDERonly when the parent was aDISC_FOLDER.Title/MP3/file.mp3therefore keyed onMP3.getConfigTargetPathused the immediate parent, socd1/MP3looked like a non-disc folder namedMP3.Fix
MP3/,M4B/, …) the same way we already walk pastcd1/.Title/MP3/(not a disc) are unchanged except they no longer collide with each other.Validation
parent_is_disc and FORMAT_FOLDERguard.