Skip to content

feat(monitoring): author-monitoring exclusion list — never re-add deleted books#715

Draft
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:feat/author-monitoring-exclusions
Draft

feat(monitoring): author-monitoring exclusion list — never re-add deleted books#715
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:feat/author-monitoring-exclusions

Conversation

@kevinheneveld

Copy link
Copy Markdown
Contributor

Draft — paced behind the currently-active PRs; will mark ready for review once a slot frees.

Problem

Deleting a book by a monitored author was futile: the next author-monitoring sweep re-discovered it in the author's catalog, saw it "missing" from the library, and added it straight back — after which automatic search re-grabbed it. There was no way to say "remove this and keep it out."

Change

An exclusion list the author sweep consults:

  • New AuthorMonitoringExclusion entity + repository. AddAsync is idempotent per identity — it dedups on a normalized ASIN when present, else a normalized title+author key (mirrors how the sweep matches catalog books to the library). New table via AddAuthorMonitoringExclusions migration.
  • AuthorMonitoringService.SyncAuthorInternalAsync loads exclusions once per sweep, builds ASIN + title-key sets, and skips matching catalog books (ExcludedCount) right after the language filter and before the library-match/add. Reuses the existing NormalizeIdentifier / BuildTitleAuthorKey helpers (no duplication).
  • LibraryController.DeleteAudiobook gains excludeFromAuthorMonitoring; when set, an exclusion is recorded before the book is deleted. AuthorMonitoringController exposes GET/DELETE /exclusions.
  • Frontend: an exclusions-management section in settings + a "keep out of author monitoring" checkbox in the delete dialog.

Testing

dotnet build clean; full suite 1016 passed / 0 failed (new MonitorAuthorAsync_SkipsExcludedBooks_WithoutAddingThem + the migration/snapshot integration tests); vue-tsc clean.

🤖 Generated with Claude Code

…eted books

Deleting a book by a monitored author only triggered the next author sweep to
re-discover it as "missing" and add it straight back (then auto-search re-grabbed
it). Add an exclusion list the sweep consults so an explicitly-removed book stays out.

- New AuthorMonitoringExclusion entity + repository (idempotent per identity: dedups
  on normalized ASIN, else a normalized title+author key) + table migration.
- AuthorMonitoringService.SyncAuthorInternalAsync loads exclusions once and skips
  matching catalog books (ExcludedCount) before the library-match/add — reusing the
  existing NormalizeIdentifier/BuildTitleAuthorKey helpers.
- LibraryController delete gains excludeFromAuthorMonitoring; when set, an exclusion
  is recorded before the book is deleted. Controller exposes GET/DELETE /exclusions.
- Frontend: exclusions management section on the settings tab + "keep out of author
  monitoring" checkbox in the delete dialog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant