feat(integrations): Audiobookshelf connection with post-import scan trigger - #807
Draft
kevinheneveld wants to merge 1 commit into
Draft
feat(integrations): Audiobookshelf connection with post-import scan trigger#807kevinheneveld wants to merge 1 commit into
kevinheneveld wants to merge 1 commit into
Conversation
…rigger
Audiobookshelf's folder watcher relies on filesystem events, which never
arrive when the library sits on a network share or another host — books
imported by Listenarr then stay invisible until a manual library scan.
Adds an Audiobookshelf integration:
- Settings (Settings → Audiobookshelf): server URL, API token (encrypted
at rest, redacted in API responses), target library, test connection
- "Scan Now" in settings plus "Update Audiobookshelf" actions on the
book detail and series views, calling POST /api/libraries/{id}/scan
- Optional automatic scan after every import (downloads and manual
uploads both converge on ScanJobProcessor); bursts are coalesced by a
trailing-edge debounce (15 s quiet window, 2 min cap) so a bulk import
triggers one scan
- When no library is configured, all libraries with media type "book"
are scanned
Outbound requests validate the target and follow redirects hop-by-hop
via OutboundRequestSecurity with private targets allowed, matching the
Prowlarr import flow.
Moves the Prowlarr settings methods of ConfigurationService into a
partial (ConfigurationService.Prowlarr.cs) to keep the file under the
500-line architecture cap.
Co-Authored-By: Claude Fable 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.
What
Adds an Audiobookshelf integration so Audiobookshelf picks up books imported by Listenarr without a manual library scan.
ISecretProtector, redacted in API responses), target library picker (or "all book libraries"), Test Connection, Scan NowPOST /api/libraries/{id}/scanon the Audiobookshelf serverScanJobProcessor, which signals a debounced scheduler (15 s trailing-edge quiet window, 2 min cap) so a bulk import produces one scan instead of dozensWhy
Audiobookshelf's folder watcher relies on filesystem events (inotify). When the library sits on a network share or the two apps run on different hosts, those events never arrive and newly imported books stay invisible until a full manual scan. The Audiobookshelf API's library-scan endpoint is the reliable alternative (watcher-update is flaky, partial scan doesn't exist).
Notes
OutboundRequestSecurity(allowPrivateTargets: true), matching the Prowlarr import flowAddAudiobookshelfSettingsToApplicationSettings(4 nullable columns onApplicationSettings)ConfigurationService's Prowlarr methods moved verbatim to aConfigurationService.Prowlarr.cspartial to stay under the 500-line architecture cap🤖 Generated with Claude Code