Skip to content

fix(metadata): populate SeriesAsin from the Audnexus series record#768

Open
m4bard wants to merge 1 commit into
Listenarrs:canaryfrom
m4bard:fix/767-series-asin
Open

fix(metadata): populate SeriesAsin from the Audnexus series record#768
m4bard wants to merge 1 commit into
Listenarrs:canaryfrom
m4bard:fix/767-series-asin

Conversation

@m4bard

@m4bard m4bard commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Fixes #767.

AudnexusSeries carries three fields:

public class AudnexusSeries
{
    public string? Asin { get; set; }
    public string? Name { get; set; }
    public string? Position { get; set; }
}

ConvertAudnexusToMetadata mapped Name and Position but dropped Asin, so AudiobookSeriesMembership.SeriesAsin was null for every audiobook — even though the column exists for it (AddAudiobookSeriesMemberships, maxLength: 64) and the repository preserves it when it is set.

Why the series ASIN matters: it is the stable identifier for a series, and neither of the alternatives is.

  • A book ASIN is per-marketplace and per-narrator. Grimm's Kinder- und Hausmärchen is B00B4FPO6A in the German catalogue and B00TPKFANI in the US one, and each returns 404 from the other region. Re-releases mint new book ASINs as well.
  • A series name is free text and varies between editions and translations.
  • The series ASIN is stable across both.

So (SeriesAsin, SeriesNumber) is the durable way to express "book N of that series", and it was unavailable because the ASIN was dropped at conversion.

Changes

Fixed

  • MetadataConverters.ConvertAudnexusToMetadata now copies AudnexusSeries.Asin into AudiobookSeriesMembership.SeriesAsin, for both the primary and the secondary membership.

Testing

MetadataConvertersSeriesAsinTests — 3 new cases, built from the live Audnexus record for H. Rider Haggard's She and Allan (B00CQ5WAXW), which belongs to two series at once:

"seriesPrimary":   { "asin": "B01E633FQM", "name": "Ayesha",           "position": "0" },
"seriesSecondary": { "asin": "B01F5TL5K4", "name": "Allan Quatermain", "position": "7" }
  • the primary membership carries its series ASIN
  • the secondary membership carries its series ASIN
  • a book in two series keeps both memberships (this already worked; pinned so it stays working)

dotnet test: 1192 passing, 0 failing (1189 existing + 3 new). No existing test changed.

Notes

Two lines. The column, the DTO field, the dual-membership handling and the persistence merge were all already in place — only the mapping was missing.

The book cited is public domain with a real Audible edition, so the case is reproducible by anyone.

AudnexusSeries carries Asin, Name and Position. ConvertAudnexusToMetadata
mapped the name and the position but dropped the ASIN, so
AudiobookSeriesMembership.SeriesAsin was null for every audiobook even though
the column exists for it and the repository preserves it when set.

The series ASIN is the stable identifier for a series. A book ASIN is not: it
is per-marketplace and per-narrator, and the same work carries different book
ASINs in different catalogues. A series name is free text that varies between
editions and translations. The series ASIN is stable across both, so
(SeriesAsin, SeriesNumber) is the durable way to say "book N of that series".

Both the primary and the secondary membership now carry it.

Fixes Listenarrs#767
@m4bard
m4bard requested a review from a team July 14, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SeriesAsin is never populated: the Audnexus series ASIN is dropped when memberships are built

1 participant