Skip to content

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

Description

@m4bard

Summary

AudiobookSeriesMembership.SeriesAsin is never populated from Audnexus. The column exists and the value is available, but the converter doesn't copy it, so the field is NULL for every audiobook.

Cause

MetadataConverters.ConvertAudnexusToMetadata builds the memberships from SeriesPrimary / SeriesSecondary:

audnexusSeriesMemberships.Add(new AudiobookSeriesMembership
{
    SeriesName = audnexusData.SeriesPrimary.Name,
    SeriesNumber = audnexusData.SeriesPrimary.Position,
    IsPrimary = true,
    SortOrder = 0
});

AudnexusSeries carries three fields:

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

Name and Position are mapped. Asin is not — even though AudiobookSeriesMembership.SeriesAsin exists for it (added in AddAudiobookSeriesMemberships, maxLength: 64), and the repository preserves it when it is set.

Why it matters

The series ASIN is the stable identifier for a series; the series name is not.

  • A book ASIN is per-marketplace and per-narrator. The same public-domain work carries different ASINs in different catalogues — 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 too.
  • 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 say "this is book N of that series", and it is currently unavailable because the ASIN is dropped at the point of conversion.

Reproduction

H. Rider Haggard's She and Allan (B00CQ5WAXW) belongs to two series at once. Live from api.audnex.us:

"seriesPrimary":   { "asin": "B01E633FQM", "name": "Ayesha",           "position": "0" },
"seriesSecondary": { "asin": "B01F5TL5K4", "name": "Allan Quatermain", "position": "7" }

After conversion, both memberships are created correctly with their names and positions — that part works — but SeriesAsin is null on both.

Expected

SeriesAsin is populated from AudnexusSeries.Asin for both the primary and secondary membership.

Notes

This looks like a small mapping omission rather than a design gap: the column, the DTO field, the dual-membership handling and the persistence merge are all already in place. Happy to put up a PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions