Summary
Fix Audible region handling so Add New/search uses the configured or ad-hoc region consistently, requests regional metadata, and emits regional Audible/Amazon links.
Changes
Added
- Add Add New region selectors, region-primary language fallback, and saved default-language preservation.
- Add regression coverage for configured default region fallback, locale headers, regional links, and region preservation in add-library metadata.
- Add a shared backend market-domain resolver for Amazon/Audible regional product URLs.
Changed
- Thread region/language through Add New search, advanced ASIN lookup, metadata conversion, add-library metadata, and product/source URL generation.
- Resolve omitted
SearchControllerrequest regions fromApplicationSettings.DefaultSearchRegionwhile preserving explicit ad-hoc request regions. - Preserve/regionalize Audible URLs even when upstream metadata does not include an ASIN.
Fixed
- Audible product/search API calls now send regional locale headers.
- Audible and Amazon product links now use the selected/result region instead of always using
.comdomains. - Vitest localStorage/esbuild warnings are removed from the local unit-test path.
- Test-created HTTP resources are disposed deterministically.
Testing
dotnet test Listenarr\listenarr.slnx --filter "FullyQualifiedName~SearchControllerUnifiedTests|FullyQualifiedName~AudibleServiceTests|FullyQualifiedName~SearchServiceFixesTests|FullyQualifiedName~LibraryController_AddToLibraryTests"npm run type-checknpm run test:unit -- --run src\__tests__\AddNewView.spec.ts src\__tests__\languageMapping.spec.ts src\__tests__\AddLibraryModal.editableMetadata.spec.ts.husky/pre-commitgit push -u origin bugfix/audible-regionhook: version sync, backend format, frontend type-check, full frontend tests (71 passed | 1 skipped,364 passed)
Notes
- Backend test restore still reports the existing SharpCompr...
Automated Canary build