Skip to content

fix: make podcast name lookups exact and safe - #413

Merged
chhoumann merged 3 commits into
masterfrom
fix/name-lookups
Oct 12, 2026
Merged

chhoumann merged 3 commits into
masterfrom
fix/name-lookups

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Podcasts named toString can now play, download, queue, and create notes. Names such as __proto__ survive saves and reloads. Name-keyed maps are normalized at decode and store boundaries, including sync merge and import rollback.

Same-titled episodes from different shows no longer share legacy progress or resolve to the wrong show in Played. Links to moved vault files play only when exactly one file has the original filename. Ambiguous links show a notice.

Refs #401. The pre-existing exact-path link failure without a Local Files entry is tracked separately in #410; stale queued file paths are tracked in #412.

Verification

  • Node v22.23.2. npm run lint, npm run format:check, npm run typecheck, npm run build, npm run test, and npm run docs:build pass. Unit suite: 1,681 tests across 95 files. The original focused regressions show 61 baseline failures and 286 passes with the fix. Review corrections add ten reproduced failures; all 66 URI tests now pass.
  • Real Obsidian 1.13.7 on Linux, isolated vault podnotes-fix-name-lookups. Reproduced on master before edits and replayed Settings, playback, download, note, queue, save/reload, Favorites, Played, direct URIs, and clicked Markdown links. Moved-video, legacy folder-space links, and folder-shadow replays also pass. No captured runtime errors. Fixture feeds: http://127.0.0.1.nip.io:30685/feed.xml (toString) and /feed-b.xml (__proto__), with 60-second WAV audio. Local link: missing Fixtures/Missing/Twin.wav, then one or two actual files named Twin.wav, timestamp 12 seconds.
  • npm run test:e2e: 70 tests across 11 files pass. The initial run exposed a fixture collision (corrected) and an external async serializer bug (obsidian-e2e#44); the final run uses a fresh vault. npm run size: 90,148 gzip bytes at level 9, +315 from 89,833; 283,516 raw bytes. Both budgets pass.

Created note and feed | Separate progress | Ambiguity notice | Unique moved file playing | Moved video

Release impact

No schema version, stored JSON shape, or public API signature changes. Existing data loads through the same codec. Runtime name-keyed records have null prototypes. The moved-file fallback uses the vault's full filename, including extension, rather than the Local Files playlist title. Existing raw and legacy-space exact paths retain their candidate order. If no exact path exists, literal + filename matches take precedence. Moved MP4/WebM files keep their explicit video choice. No identity redesign or player source-selection changes.

Docs at release

In docs/src/content/docs/local_files.md and timestamps.md, state that a missing path resolves by its full filename only when exactly one vault file matches. With no match, PodNotes says No vault file is named "<name>". With multiple matches, it asks the user to update the link with the correct path. Document the unchanged legacy + path order and that moved video retains its selected type. Add the special-name and same-titled progress fixes to the change notes. Documentation content is unchanged in this PR.

Note

Fix podcast name lookups to be exact and prototype-safe

  • Lookups for podcasts, played episodes, playlists, and downloads now use prototype-free maps, so keys like __proto__ and toString are treated as ordinary names
  • Adds ownRecord in ownRecord.ts and a recordStore wrapper in recordStore.ts; stores, codecs, merge logic, and settings import rollback all route through them
  • Schemeless links to moved local files now resolve by unique basename match across the vault instead of a name-only fallback, and refuse to play when the basename is missing or ambiguous
  • Legacy title-keyed played records no longer apply to episodes from a different podcast, via podcastNamesAgree and getPlayedEpisode in episodeStatus.ts
  • Risk: safeEntries is removed from codecUtils.ts and DEFAULT_SETTINGS maps are now null-prototype objects; out-of-tree code that relied on object literals or the removed helper would need updating

Macroscope summarized ca69f58.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: ca69f58
Status: ✅  Deploy successful!
Preview URL: https://06aa35d0.podnotes.pages.dev
Branch Preview URL: https://fix-name-lookups.podnotes.pages.dev

View logs

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.

1 participant