Repository navigation
names: parse the grouping folder, not the first path component - #33
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
Junk-tag searches used the first folder under source_path as the release name. Author/Title (Freida McFadden/The Guest/) and category/Release (completed/The Guest/) layouts then searched Audible for the author or "completed" and cached a miss. Parse the same folder groupingName uses. 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
Junk-tag Audible searches parsed the first folder under
source_pathas the release name. Two common layouts then searched for the wrong title and cached a miss (thebookmarker never expires):Freida McFadden/The Guest/file.m4bparsedFreida McFaddenas the title.completed/The Guest/file.m4b(typical qBittorrent category folder whensource_pathis the downloads root) parsedcompletedas the title.cd1//MP3//64k/wrappers under a real release folder were already fine (Some Release/cd1/still parsedSome Release).Root cause
releaseNameForBooktookrel.split(os.sep)[0]. That matchesRelease/fileandRelease/cd1/file, but not Author/Title or a category folder. Grouping already keys on the title/release folder (groupingName); parsing did not.Fix
releaseNameForBooknow returnsgroupingName(...)— the same folder used as the book key — and still falls back to the grouping key for a loose file or a path outside the source.Validation
completed/Release, andAuthor/Title/cd1.AudioTrack 01tags under those layouts searchtitle:The Guest, not the author orcompleted.Release/cd1and loose-file cases unchanged.python3 -m unittest discover -s tests -p 'test_*.py': 222 OK.