generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
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):
- at the very end of
podNotesURIHandler()insrc/URIHandler.ts, after the aforementioned notice, I addapi.currentTime = parseFloat(time); - in
onMetadataLoaded()fromsrc/ui/PodcastView/EpisodePlayer.svelte, I commented out the call torestorePlaybackTime()
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels