Repository navigation
feat(chapters): show ID3 chapters embedded in MP3 episodes - #521
Merged
Merged
Conversation
Deploying podnotes with
|
| Latest commit: |
0659355
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1e86fd77.podnotes.pages.dev |
| Branch Preview URL: | https://feat-mp3-chapters.podnotes.pages.dev |
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 #512. MP3 episodes that embed ID3 CHAP chapters now show them in the player, the progress bar, headset chapter skips, and the
{{chapters}}note tag, the same way Podcasting 2.0 chapter files already work. A chapter file in the feed still wins.requestUrl, then for the rest of the tag when it is larger. It skips tags over 16 MB.Scope
docs/STYLE.md.player.mdandtemplates.mdsay chapters come from the feed.Tradeoffs
requestUrlcannot stream or cancel. A server that ignores Range sends the whole file once, and PodNotes then keeps "no chapters" for the session. Every host I probed honors Range through its redirects (Spreaker, Podtrac, Libsyn, Megaphone, Simplecast, atp.fm), and the audio element downloads the file anyway as it plays. A rendererfetchcould abort early, but most podcast hosts send no CORS headers.Verification
{{chapters}}note. Added https://atp.fm/rss and played 714: 13 chapters with UTF-16 and emoji titles in the 820 px layout. After a plugin reload the restored player made no request until Play, and an open Up next stayed open when the chapters arrived.requestUrlsent the Range requests, the 4 Efervesciencia chapters loaded, and a tap seeked to 37:05.an MP3's ID3 chapters load once it plays, and a chapter seeks. The fixture server now serves a silent MP3 with a real ID3 tag. The test fails with the ID3 path disabled. Fullnpm run test:e2e: 243 of 244 passed. The other one, settings export/import inmarketplace-review-runtime.test.ts, passed on two reruns.npm run lint,format:check,typecheck,build,test(2,793 tests),test:tooling,docs:build, andsize(102,325 of 103,000 gzip bytes) pass.Release impact
None. No settings, storage, API, or URI change.
fetchChaptersis internal.Note
Medium Risk
Adds Range-based network reads and binary ID3 parsing on the playback path; behavior is bounded but touches core player, media session, and note creation.
Overview
Adds ID3 CHAP chapter support for streamed MP3s when the feed has no Podcasting 2.0 chapters file. A feed chapters URL still wins; otherwise PodNotes reads chapter markers from the media via HTTP Range requests (first 64 KB, then the rest of the tag, capped at 16 MB).
Chapter loading is unified on an episode (
chaptersUrl+streamUrl) throughfetchChapters,loadChapters, andchaptersKeycaching. Failed fetches stay uncached for retry; confirmed empty chapter lists are cached so chapterless files are not re-read. The player defers ID3 loads until playback starts on a restored session (no media fetch until Play). Headset chapter skip,{{chapters}}notes, and the Chapters panel use the same path.The player only clears an open Chapters panel when the episode changes; Transcript/Up next selections can persist when chapters arrive later.
Reviewed by Cursor Bugbot for commit dab3871. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show ID3 chapters embedded in MP3 episodes
fetchChaptersnow takes anEpisode-derivedChaptersSourceand a newchaptersKeyutility preferschaptersUrloverstreamUrlin fetchChapters.ts. Local media returns no chapters without a network request.Episodeto the loader in mediaSession.ts.fetchJsonChaptersnow returnsundefinedfor failed requests instead of an empty array, and the host chapter-loader contract inMediaSessionHostchanged from URL toEpisode.📊 Macroscope summarized 0659355. 9 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues