/** * Component: Audiobookshelf Library Settings Section * Documentation: documentation/settings-pages.md */ import { Input } from '@/components/ui/Input'; import { Button } from '@/components/ui/Button'; import { Settings, ABSLibrary } from '../../lib/types'; import { AUDIBLE_REGIONS } from '@/lib/types/audible'; interface AudiobookshelfSectionProps { settings: Settings; onChange: (settings: Settings) => void; onValidationChange: (section: string, isValid: boolean) => void; libraries: ABSLibrary[]; testing: boolean; testResult: { success: boolean; message: string } | null; onTestConnection: () => void; } export function AudiobookshelfSection({ settings, onChange, onValidationChange, libraries, testing, testResult, onTestConnection, }: AudiobookshelfSectionProps) { const handleServerUrlChange = (serverUrl: string) => { onChange({ ...settings, audiobookshelf: { ...settings.audiobookshelf, serverUrl }, }); onValidationChange('audiobookshelf', false); }; const handleApiTokenChange = (apiToken: string) => { onChange({ ...settings, audiobookshelf: { ...settings.audiobookshelf, apiToken }, }); onValidationChange('audiobookshelf', false); }; const handleLibraryChange = (libraryId: string) => { onChange({ ...settings, audiobookshelf: { ...settings.audiobookshelf, libraryId }, }); onValidationChange('audiobookshelf', false); }; const handleTriggerScanChange = (triggerScanAfterImport: boolean) => { onChange({ ...settings, audiobookshelf: { ...settings.audiobookshelf, triggerScanAfterImport }, }); }; const handleAudibleRegionChange = (audibleRegion: string) => { onChange({ ...settings, audibleRegion, }); }; return (
Configure your Audiobookshelf server connection and audiobook library.
Generate in Audiobookshelf: Settings → API Keys → Add API Key
Non-English Region
Many features such as search, discovery, and metadata matching are not yet fully supported for non-English regions. You may still proceed, but expect limited functionality.
Select the Audible region that matches your metadata engine (Audnexus/Audible Agent) configuration in Audiobookshelf. This ensures accurate book matching and metadata.