Skip to content

Podcast Player <--> Podcast Note link break after PodNotes update #315

Description

@TheAlexSannikov

Hi,

First off, I'd like to thank everyone who's worked on this extension. It's been a great tool!

Issue

I'd like to report that many of my podcast links were broken after I upgraded from PodNotes v2.15.1 -> v2.20.1.

The cause of this appears to be a change in how the File path's {{title}}, and the episodeName as created by the PodNotes: Capture Timestamp command are derived.

Below is a snippet from my PodNotes_Settings.json

    "note": {
      "path": "podcasts/{{podcast}} - {{title}}",
    },

Below are sample podcast episode titles that were broken:

Created in v2.15.1 behavior (in v2.20.1) {{podcast}} - {{title}} (in file path) Example timestamp
  PodNotes Player --> Note broken Note --> PodNotes Player works Philosophize This! - Episode 001 Presocratic Philosophy - Ionian obsidian://podnotes?episodeName=Episode+%23007+...+Daoism&url=https%3A%2F%2Ffeeds.megaphone.fm%2FQCD6036500916&time=300.2765343503372
  PodNotes Player --> Note broken PodNotes Player --> Note broken Huberman Lab - Dr. Martha Beck Access Your Best Self With Mind-Body Practices Belief Testing Imagination obsidian://podnotes?episodeName=Dr.+Martha+Beck%3A+Access+Your+Best+Self+With+Mind-Body+Practices%2C+Belief+Testing+%26+Imagination&url=https%3A%2F%2Ffeeds.megaphone.fm%2Fhubermanlab&time=2580.5099010626614
Created in v2.20.1      
  * PodNotes Player <--> note works as expected Philosophize This! - Episode 001 ... Presocratic Philosophy obsidian://podnotes?episodeName=Episode%20%23007%20...%20Daoism&url=https%3A%2F%2Ffeeds.megaphone.fm%2FQCD6036500916&time=300.413576
  PodNotes Player <--> note works as expected Huberman Lab - Access Your Best Self With Mind-Body Practices Belief Testing Imagination Dr. Martha Beck obsidian://podnotes?episodeName=Access%20Your%20Best%20Self%20With%20Mind-Body%20Practices%2C%20Belief%20Testing%20%26%20Imagination%20%7C%20Dr.%20Martha%20Beck&url=https%3A%2F%2Ffeeds.megaphone.fm%2Fhubermanlab&time=3171.948611

After examining the Philosophize This! example, it appears that the File path's {{title}} must have changed how it sanitizes / handles certain characters. However, while studying the Huberman Lab example it appears that there is some structural change in how {{title}} is created between the two versions, since "Dr. Martha Beck" appears to have moved in the title.

Also in 2.20.1 there appears to be different encoding of the episodeName, where in v2.15.1 it would use +, but in 2.20.1 it uses %20% in place of a space. I don't think this is the cause for links breaking seeing as the "Philosophize This!" Note -> Player link continues to work after migration, but a notable difference.

Since matching from PodNote's player <---> Podcast Note seems to match based on the Note's file name, which for all intents and purposes has some dependency on the {{title}} file path param, then it follows that any change to how the {{title}} , without proper care would result in many notes breaking.

Possible solutions

For Timestamp -> Player episode Links and Player -> Note link, fallback to older possible link arrangements

Fallback logic for clicking when a "Philosophize This!" episode has a corresponding note:

  • First check if any notes exist in expected file location with {{title}} = Episode 001 ... Presocratic Philosophy
  • If not, check if any notes exist in expected file location with {{title}} = Episode 001 Presocratic Philosophy
  • Continue to check against any notes exist in expected file location with any other legacy arrangements for {{title}}

Presumably similar can be applied for the Huberman Lab episode:

  • {{title}} = Access Your Best Self With Mind-Body Practices Belief Testing Imagination Dr. Martha Beck
  • {{title}} = Dr. Martha Beck Access Your Best Self With Mind-Body Practices Belief Testing Imagination
  • .. any other legacy arrangements for {{title}}

The fallback Note -> Player linking logic for a legacy timestamp link:

  • If PodNotes cannot find an episode for the link, then try with legacy episodeName arrangements
    2.15.1: episodeName=Dr.+Martha+Beck%3A+Access+Your+Best+Self+With+Mind-Body+Practices%2C+Belief+Testing+%26+Imagination
    2.20.1: episodeName=Access%20Your%20Best%20Self%20With%20Mind-Body%20Practices%2C%20Belief%20Testing%20%26%20Imagination%20%7C%20Dr.%20Martha%20Beck

Another version is to create optional durable versions for the params, eg {{title_vM.m.p}} that will always create and read using a particular format used by a certain version. This would ensure note title format doesn't unexpectedly change, but it is more of a temporary solution since users would likely want to benefit from the increased sanitization and etc that comes with newer {{title}} formats.

In either of the above cases, it would be wise to create some sort of migration tool that searches your Vault for broken PodNotes links and file names to update them to match the latest version.
(Splitting hairs here but if we do create this, then it'd be ideal if the order of files being updated matches the order they were created, so as to maintain the order of most recently edited files)

Wrapping up

Thank you for humoring my report. I'd greatly appreciate if this bug could be fixed and it would be ideal to avoid destructive changes such as changes to how titles are created given the importance of file name matching. Ensuring links are always backwards compatible would undoubtable strengthen user confidence in PodNotes.

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