Summary
When ListenArr scans an existing audio file (m4b/mp3) that has an ASIN embedded in its tags, the ASIN is not extracted and stored. The "Rescan Metadata" button then fails immediately with "No ASIN or ISBN identifiers are available for metadata rescan", even though the information is sitting in the file.
Root cause
FfprobeTagMetadataMapper.Apply() in listenarr.infrastructure/Ffmpeg/Metadata/FfprobeTagMetadataMapper.cs only maps a small set of tags:
```csharp
metadata.Title = FirstNonEmpty(metadata.Title, GetTag(tags, "title", "TITLE"));
metadata.Artist = FirstNonEmpty(metadata.Artist, GetTag(tags, "artist", "ARTIST"));
metadata.Album = FirstNonEmpty(metadata.Album, GetTag(tags, "album", "ALBUM"));
metadata.AlbumArtist = ...
metadata.TrackNumber ...
metadata.DiscNumber ...
metadata.Year ...
```
ASIN is never read, even though ffprobe surfaces it under the key ASIN (from ----:com.apple.iTunes:ASIN, the standard location used by Audible-ripped files and most audiobook taggers).
Impact
Any file imported into the library that already carries an ASIN tag starts life with no identifiers. The user must then manually open Edit Metadata → Identifiers → Add ASIN and type/paste the value before Rescan Metadata will work. This defeats the purpose of the embedded tag.
Suggested fix
- Add
Asin (and optionally Isbn) to AudioMetadata if not already present.
- In
FfprobeTagMetadataMapper.Apply(), read it:
```csharp
metadata.Asin = FirstNonEmpty(metadata.Asin, GetTag(tags, "ASIN", "asin"));
```
- In
LibraryAddService (or wherever the AudioMetadata → Audiobook mapping occurs), populate audiobook.Asin / audiobook.ExternalIdentifiers from metadata.Asin when non-empty.
Happy to submit a PR with these changes if the approach looks right to you.
Environment
- ListenArr (latest
main)
- File type: m4b (AAC), ASIN stored at
----:com.apple.iTunes:ASIN
- ffprobe confirms the tag is present in the file; ListenArr DB shows
asin = null after scan
Summary
When ListenArr scans an existing audio file (m4b/mp3) that has an ASIN embedded in its tags, the ASIN is not extracted and stored. The "Rescan Metadata" button then fails immediately with "No ASIN or ISBN identifiers are available for metadata rescan", even though the information is sitting in the file.
Root cause
FfprobeTagMetadataMapper.Apply()inlistenarr.infrastructure/Ffmpeg/Metadata/FfprobeTagMetadataMapper.csonly maps a small set of tags:```csharp
metadata.Title = FirstNonEmpty(metadata.Title, GetTag(tags, "title", "TITLE"));
metadata.Artist = FirstNonEmpty(metadata.Artist, GetTag(tags, "artist", "ARTIST"));
metadata.Album = FirstNonEmpty(metadata.Album, GetTag(tags, "album", "ALBUM"));
metadata.AlbumArtist = ...
metadata.TrackNumber ...
metadata.DiscNumber ...
metadata.Year ...
```
ASIN is never read, even though ffprobe surfaces it under the key
ASIN(from----:com.apple.iTunes:ASIN, the standard location used by Audible-ripped files and most audiobook taggers).Impact
Any file imported into the library that already carries an ASIN tag starts life with no identifiers. The user must then manually open Edit Metadata → Identifiers → Add ASIN and type/paste the value before Rescan Metadata will work. This defeats the purpose of the embedded tag.
Suggested fix
Asin(and optionallyIsbn) toAudioMetadataif not already present.FfprobeTagMetadataMapper.Apply(), read it:```csharp
metadata.Asin = FirstNonEmpty(metadata.Asin, GetTag(tags, "ASIN", "asin"));
```
LibraryAddService(or wherever theAudioMetadata→Audiobookmapping occurs), populateaudiobook.Asin/audiobook.ExternalIdentifiersfrommetadata.Asinwhen non-empty.Happy to submit a PR with these changes if the approach looks right to you.
Environment
main)----:com.apple.iTunes:ASINasin = nullafter scan