Skip to content

feat: add recently-added scan and fix file detection for unmonitored books - #8

Open
breakthestatic wants to merge 1 commit into
jabloink:feat-readarrfrom
breakthestatic:feat-readarr
Open

breakthestatic wants to merge 1 commit into
jabloink:feat-readarrfrom
breakthestatic:feat-readarr

Conversation

@breakthestatic

Copy link
Copy Markdown

Description

  • Adds a readarr-recently-added-scan job that runs every 10 minutes and only processes books with state changes using a DB comparison filter, reducing scan time from ~9 minutes to seconds on my Chaptarr instance.
  • Fixes file detection by using bookFileCount > 0 instead of percentOfBooks >= 100. Chaptarr's bookCount excludes unmonitored books, causing percentOfBooks=0 even when files exist. bookFileCount is a strict superset that works in both original Readarr and Chaptarr.
  • Adds a concurrent scan guard to prevent overlapping scans.
  • Changed the "no HC ID" logging to DEBUG as I've found a large portion of the Chaptarr library doesn't have valid Hardcover IDs (e.g. comic books, compilations, etc.) In my case, 1/3 of the items returned from Chaptarr didn't have valid HC IDs (~2k out of 6k items returned from the Chaptarr API). This was spamming the log, so I felt it better to lower the level.

AI Disclosure: I used AI to investigate existing patterns in the codebase and offer potential high-level suggestions for initial approach. Wrote the code myself but used AI to clean up comments documenting the code changes.

How Has This Been Tested?

Tested against my own personal Chaptarr & Seerr instances. Also tested against a small original Readarr instance (using rreading-glasses). Tested initial full scan and subsequent recently added scans by requesting new media and watching the Seerr logs during and after completion of the request in Chaptarr/Readarr.

Screenshots / Logs (if applicable)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

This branch has not been deployed

No deployments
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