You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(notes): add {{episodelink}} template tag to resume an episode from its note (#35) (#193)
* feat(notes): add {{episodelink}} template tag to resume an episode from its note (#35)
Add a no-timestamp obsidian://podnotes deep link so an episode note can link
back to the player and resume from the last played location (or the start if
unplayed). The resume point is resolved at click time, not baked into the note.
- New {{episodelink}} note-template tag (src/utility/buildEpisodeResumeLink.ts)
- URIHandler: a link without time reopens the episode and defers the seek to the
player's existing saved-progress restore; explicit-time links are unchanged
- Docs + unit tests for the link builder, URI handler, and template tag
* fix(notes): make {{episodelink}} resume robust to finished episodes and stale seeks (#35)
Address adversarial review of #193:
- Finished episodes (saved at time===duration) no longer resume at EOF and
auto-advance the queue; the no-time path resolves the resume point explicitly
and restarts a finished episode from the beginning (resolveResumeTime), both
for non-loaded and already-loaded episodes.
- The no-time path now arms requestedPlaybackTime explicitly instead of relying
on its absence, so a stale pending seek from an earlier link to the same
episode can no longer override the resume on metadata load.
- buildEpisodeResumeLink falls back to a downloaded copy's path when an episode
lacks feedUrl, and drops a redundant cast (isLocalFile already narrows).
- Tests for finished resume (non-loaded + loaded), stale-seek override, and the
downloaded-without-feedUrl link; docs note finished -> start behavior.
Copy file name to clipboardExpand all lines: docs/docs/templates.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ This template will be used to create the note text. You can use the following sy
40
40
- `{{duration:minutes}}` → total whole minutes (e.g. `62`); `{{duration:seconds}}` → total seconds (e.g. `3723`).
41
41
- Any other argument is treated as a clock format using the tokens `H`/`HH`, `h`/`hh`, `m`/`mm`, `s`/`ss`, `A`/`a` — e.g. `{{duration:HH:mm:ss}}` → `01:02:03`. (Unlike `{{date}}`, `[literal]` bracket escaping is not supported here.)
42
42
-`{{artwork}}`: The URL of the podcast artwork. If no artwork is found, an empty string will be used.
43
+
-`{{episodelink}}`: A clickable `obsidian://podnotes` link that reopens this episode in the PodNotes player and **resumes from where you left off** (or starts at the beginning if you have never played it, or have already finished it). The resume position is resolved when you click the link — not baked in when the note is created — so the link always jumps to your latest position. Put it in your template to get a "back to the episode" link on every note, e.g. `[▶️ Resume in PodNotes]({{episodelink}})`. The value is the bare URL, so wrap it in your own Markdown link text. It is empty when the episode has no feed URL or local file path to address it by. See [issue #35](https://github.com/chhoumann/PodNotes/issues/35).
43
44
44
45
### Linking an episode to its podcast (feed) note
45
46
In an episode note, `{{url}}` and `{{artwork}}` always describe the **episode**. To reference the parent podcast (feed), use these additional tags:
0 commit comments