Skip to content

Use album as title for chaptered m4b files - #86

Open
cjonesde wants to merge 1 commit into
ben-xo:mainfrom
cjonesde:fix/issue-81-chaptered-m4b-titles
Open

Use album as title for chaptered m4b files#86
cjonesde wants to merge 1 commit into
ben-xo:mainfrom
cjonesde:fix/issue-81-chaptered-m4b-titles

Conversation

@cjonesde

Copy link
Copy Markdown

Fixes #81.

getID3 copies every ©nam atom into comments['title']. Chaptered m4b files carry one per chapter, so title[0] is a chapter name such as "Opening Credits" rather than the work's title.

Measured on an 810-episode library: affected files carried 17 and 18 ©nam atoms, matching their chapter counts. Unaffected files carry exactly one. This is why the reporter in #81 saw "End Credits", and it is independent of the chpl chapter list.

Fix

Prefer album, which is not chapterised. Failing that, take the last entry rather than the first: the work's own ©nam is in moov/udta, which is parsed after the chapter tracks.

Scoped to quicktime-tagged files, so anything carrying both ID3v1 and ID3v2 titles is untouched.

Tests

Two fixtures, with and without an album tag. Both are synthetic (ffmpeg silence with ©nam atoms injected), so no third-party audio is added to the repo. 1113 and 1080 bytes.

1068 tests pass, up from 1062. The new tests also run under the Caching and AUTO_SAVE_COVER subclasses.

Verified against the 810-episode library: a full re-parse produces byte-identical output to a local patch that has been in production there.

getID3 copies every ©nam atom into comments['title']. Chaptered m4b files
carry one per chapter, so title[0] is a chapter name ("Opening Credits")
rather than the work's title.

Prefer album, which is not chapterised. Failing that use the last entry:
the work's own ©nam is in moov/udta, parsed after the chapter tracks.

Scoped to quicktime tags, so files carrying both ID3v1 and ID3v2 titles
are unaffected. Both fixtures are synthetic: ffmpeg silence with ©nam
atoms injected.

Fixes ben-xo#81
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.

Strange strings getting used as <title> for episodes in Podcast XML

1 participant