Repository navigation
Recognise "Series by" and "Books 1 to 5" release names as collections - #95
Open
TheMightyTRex wants to merge 1 commit into
Open
TheMightyTRex wants to merge 1 commit into
TheMightyTRex wants to merge 1 commit into
Conversation
Automatic selection keeps series packs away from single book requests
by matching release names against PACK, which only knew a numbered
range written with a dash ("Books 1-5"). Names such as "The Long Earth
Series By Stephen Baxter and Terry Pratchett" or "The Long Earth
series, books 1 to 5" were taken for one book, so an automatic grab
could pick a whole pack.
Match "series by" and numbered ranges written with "to" as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Problem
Automatic selection keeps series packs away from single book requests by checking release names against the
PACKpattern inservices/app/domain/automatic_eligibility.py. The pattern only recognises a numbered range written with a dash, such as "Books 1-5". Common indexer names such as "The Long Earth Series By Stephen Baxter and Terry Pratchett" or "The Long Earth series, books 1 to 5" are not recognised, so an automatic grab can take a whole series pack for one book.Change
The
PACKpattern now also matches:The pattern is shared, so the same names are also treated as collections where
PACKis used during import and in the possible collection flag on book sources.Testing
test_whole_series_names_are_collectionsintests/unit/test_pack_coverage.pycovers both name forms. It fails without the change.automatic_eligibility,automatic_selectionorcollection_candidate(42 files, unit and integration): 784 passed.ruff checkandruff format --checkpass.🤖 Generated with Claude Code