Repository navigation
feat(providers): add Readarr integration - #61
Conversation
0ae105d to
3e06df6
Compare
|
Part of a set of integration PRs. Overview, merge order and design notes: #64 |
itz4blitz
left a comment
There was a problem hiding this comment.
Requesting changes. The Readarr provider itself matches upstream: API v1, no event type 2, bookFileImported at 3 through downloadIgnored at 10, id readarr, registered in both backend provider maps.
-
Please rebase onto current
masterafter #57 (and #60) land. This branch has the parser fix but not0808207, which excludes*.debug.*and*.trace.*. Merging it alone would tail those rolling logs now that one-digit NLog lines are actually ingested. A merge onto post-#57 master keeps the excludes; once Lidarr is in, the shared wiring files will conflict and a rebase is required anyway. -
Standing health errors will insert a new activity on every poll.
ArrBaseProvider.normalizeHealthChecksuses`health-${check.source}-${Date.now()}`, and queue warnings do the same. Ingestion dedupes on(serverId, externalActivityId), so a new id is a new row. This provider's own header says most installs have a permanent BookInfo health error. Please override those ids so a standing check is stable (source + message), the same way Bazarr's health id is a hash of the issue text. Otherwise a Readarr server fills the log table every poll interval.
Follow-up: issue_source has no readarr value, so issues are stored as system. That needs a migration. Whisparr already has the same gap.
Add @logarr/provider-readarr on top of the shared provider-arr base, using Readarr's v1 API. Readarr was retired upstream in June 2025 (last release v0.4.18); it is supported best-effort and labelled as such in the UI and README. - v1 ArrClient with history and history/since (includeAuthor/includeBook) - History normalization for all EntityHistoryEventType values (including the gap at 2), accepting numeric and camelCase event types; downloadFailed and unknown "*Failed" events are errors; stable readarr-history-<id> ids - Reuses the existing READARR_LOG_FILE_CONFIG for readarr.txt file tailing - Backend registration, env seeding (READARR_URL/READARR_API_KEY, /readarr-logs), Dockerfiles, compose, turbo env - Frontend: Readarr integration flipped to available, logs deep link - README updates with a retirement notice
…th provider conventions
…with sibling *arr providers
…ties Standing health checks and queue warnings used Date.now() in their id, so every poll inserted a new activity row. Health ids are now a hash of source/type/message and queue ids derive from the queue item id, warning state and message. Fixes the same issue for all *arr providers.
|
Thanks, both points are addressed.
These ids conflict with #67, which flags the same health and queue rows so their "now" timestamps don't move the sync cursor. Whichever of the two merges second needs a small rebase, and I'll handle it.
|
3e06df6 to
41517ec
Compare
Summary
Adds a Readarr integration (
@logarr/provider-readarr) on the sharedprovider-arrbase, using Readarr's v1 API.ArrClientsubclass for the v1 API readshistoryandhistory/sincewithincludeAuthorandincludeBook.provider-arrhelpers from fix: *arr log file ingestion emits no entries (timestamp regex + context parser contract) #57 (resolveArrEventName,describeArrEvent,toArrItemId). The Lidarr PR uses the same helpers and severity table, so the two behave the same, including metadata keys and description wording.EntityHistoryEventTypevalue, checked against Readarr source. That includes the missing value 2, which maps tounknown.downloadFailedand any unknown*Failedevent are errors.bookImportIncompleteis a warning, anddownloadIgnoredis info, the same as Lidarr.readarr-history-<id>.READARR_LOG_FILE_CONFIGto tailreadarr.txt.READARR_URL,READARR_API_KEYandREADARR_LOGS_PATH, mounted at/readarr-logs;turbo.jsonenv;availablewith a retirement notice;Testing
@logarr/provider-readarrhas 84 unit tests covering:X-Api-Keyheader, retries, and 401 handling;pnpm build,lint,typecheckandtestall pass.pnpm install --frozen-lockfileis clean, and the lockfile diff only adds the new package.