feat(search): configurable automatic-search interval, per-book delay, title-only fallback#714
Open
kevinheneveld wants to merge 1 commit into
Open
Conversation
… title-only fallback The automatic-search sweep ran on a hardcoded 6h cadence with no throttle. Add three ApplicationSettings, read each sweep so changes take effect without a restart: - AutomaticSearchIntervalHours (default 24, clamped [1,168]) — sweep cadence; also gates the "not searched since" cutoff so a book isn't re-searched more often than this. - AutomaticSearchBookDelaySeconds (default 5, clamped [0,300]) — delay between per-book searches so a large wanted list doesn't hammer the indexers. Manual search is untouched. - AutomaticSearchTitleOnlyFallback (default true) — when the full "Title Author Series" query finds nothing, retry with a title-only query (opt-out on the background sweep). Migration adds the columns with those defaults so the existing settings row is correct. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
The automatic-search background sweep ran on a hardcoded 6-hour cadence and searched every wanted book back-to-back with no throttle. On a large wanted list that hammers the indexers (and a shared Prowlarr). This adds three
ApplicationSettings, read fresh each sweep so changes take effect without a restart:AutomaticSearchIntervalHours(default 24, clamped[1,168]) — sweep cadence, via the service'sintervalProvider. Also drives the "not searched since" cutoff so a book isn't re-searched more often than the configured interval.AutomaticSearchBookDelaySeconds(default 5, clamped[0,300]) — delay between per-book searches during the sweep.0disables it. Manual "Search now" is unaffected.AutomaticSearchTitleOnlyFallback(default true) — when the fullTitle Author Seriesquery returns nothing, retry once with a title-only query to catch loosely-named releases. Doubles indexer queries for unfound books, so it's opt-out on the background sweep.Changes
ApplicationSettings: 3 new properties + migrationAddAutomaticSearchTuning(column defaults 24/5/true so the existing singleton row is correct) + snapshot.AutomaticSearchService: interval now read from settings each cycle (GetSearchInterval, clamped, 24h fallback on error).AutomaticSearchProcessor: reads the settings, applies the per-book delay in the sweep loop, and the interval-aware cutoff.ProcessAudiobookAsync+AutomaticSearchResultClassifier.BuildTitleOnlySearchQuery: the title-only fallback retry.Testing
dotnet buildclean (0 warnings/0 errors); full suite green (1015 passed), including the migration/model-snapshot integration tests.🤖 Generated with Claude Code