fix(metadata): populate SeriesAsin from the Audnexus series record#768
Open
m4bard wants to merge 1 commit into
Open
fix(metadata): populate SeriesAsin from the Audnexus series record#768m4bard wants to merge 1 commit into
m4bard wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #767.
AudnexusSeriescarries three fields:ConvertAudnexusToMetadatamappedNameandPositionbut droppedAsin, soAudiobookSeriesMembership.SeriesAsinwasnullfor 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.
B00B4FPO6Ain the German catalogue andB00TPKFANIin the US one, and each returns 404 from the other region. Re-releases mint new book ASINs as well.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.ConvertAudnexusToMetadatanow copiesAudnexusSeries.AsinintoAudiobookSeriesMembership.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: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.