github Listenarrs/Listenarr v1.10.17-canary
Canary 1.10.17

pre-release47 minutes ago

Fixes #1210.

Disclosure: drafted with Claude Code at my direction; I read the cited code at the stated commit and reviewed this before posting.

Problem

Books added by series or author monitoring are stored with an ASIN identifier whose Region is null. The Broken books group then lists them as missing a region, and Rescan metadata cannot choose an Audible catalogue for them. A book added by hand keeps its region (read at dc14be0, v1.10.6).

Cause

MapToMetadata in SeriesMonitoringService.Mapping.cs and AuthorMonitoringService.Mapping.cs builds the AudibleBookMetadata without a Region. LibraryAddService passes metadata.Region to SyncImportedIdentifiersFromLegacyFields, which stores NormalizeRegion(null), so the identifier gets a null region.

Change

  • MapToMetadata takes the region and sets it on the metadata. Both call sites pass the monitor's region, which is the one the catalogue was fetched with and is always set on a monitor.
  • Four production lines in four files, plus two tests.

Not changed

  • Rows already stored with a null region are not repaired by this change. No migration is included. A one-off backfill from the matching monitor's region is possible and I can propose it separately if wanted.
  • Two other paths call the identifier sync without a region and are left alone: the fallback LibraryAddWorkflow.AddCoreAsync (used only when no add service is registered) and LibraryUpdateWorkflow.Metadata.cs on a legacy-field edit.

Evidence

  • Read: MapToMetadata has exactly two call sites, both updated. The monitor region is a non-null string defaulting to "us".
  • Measured: two new tests, MonitorSeriesAsync_StoresAddedBookAsinWithTheRegionOfTheMonitor (real add service and repository, region "uk", reads the stored ASIN identifier back) and MonitorAuthorAsync_PassesTheRegionOfTheMonitorToTheAddedBook. With the production change reverted both fail (expected "uk", got null); with i...

Automated Canary build

Don't miss a new Listenarr release

NewReleases is sending notifications on new releases.