Skip to content

Feature Request: Timestamp-Driven Episode Switching in PodNotes Player #164

@gracchen

Description

@gracchen

Hello, I am trying to have fast switching between different episode timestamp links using the capture timestamp command with the "{{linktime}}" format. However, when switching to an episode not currently playing in PodNotes Player, it will default to the last played timestamp or 0 instead of the timestamp of the just clicked link. The plugin already acknowledges this with a popup notice: "Episode found, playing now. Please click timestamp again to play at specific time."

So as a workaround, I made two slight modifications that successfully addresses my issue (so far):

  1. at the very end of podNotesURIHandler() in src/URIHandler.ts, after the aforementioned notice, I add api.currentTime = parseFloat(time);
  2. in onMetadataLoaded() from src/ui/PodcastView/EpisodePlayer.svelte, I commented out the call to restorePlaybackTime()

I am not familiar with the repo or svelte, so any improvements or adoption of this workaround as a toggle-able option would be greatly appreciated!


git log:

diff --git a/src/URIHandler.ts b/src/URIHandler.ts
index 1681995..9e34f18 100644
--- a/src/URIHandler.ts
+++ b/src/URIHandler.ts
@@ -50,7 +50,6 @@ export default async function podNotesURIHandler(
        currentEpisode.set(episode);
        viewState.set(ViewState.Player);

-       new Notice(
-               "Episode found, playing now. Please click timestamp again to play at specific time."
-       );
+
+       api.currentTime = parseFloat(time);
 }
diff --git a/src/ui/PodcastView/EpisodePlayer.svelte b/src/ui/PodcastView/EpisodePlayer.svelte
index 5a1b380..6d2898d 100644
--- a/src/ui/PodcastView/EpisodePlayer.svelte
+++ b/src/ui/PodcastView/EpisodePlayer.svelte
@@ -109,8 +109,7 @@

        function onMetadataLoaded() {
                isLoading = false;
-
-               restorePlaybackTime();
+               //restorePlaybackTime();
        }

        function restorePlaybackTime() {
(END)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions