From b092d6870c4b72a54e42f1f99964f64e75dffcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Mon, 8 Sep 2025 21:52:50 +0100 Subject: [PATCH 1/3] feat(UI/Settings): Add documentation Add shadow documentation on note settings for template --- src/ui/settings/PodNotesSettingsTab.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/settings/PodNotesSettingsTab.ts b/src/ui/settings/PodNotesSettingsTab.ts index 465d83a..5fe0af4 100644 --- a/src/ui/settings/PodNotesSettingsTab.ts +++ b/src/ui/settings/PodNotesSettingsTab.ts @@ -215,6 +215,8 @@ export class PodNotesSettingsTab extends PluginSettingTab { "\nPublishDate:: {{date:YYYY-MM-DD}}" + "\n### Description" + "\n> {{description}}", + "\n### Audio File URL" + + "\n> {{stream}}", ); }); From 63ec67340ef18600161386177fda0a95e5909680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Mon, 8 Sep 2025 21:57:50 +0100 Subject: [PATCH 2/3] docs(Template): Update Template docs to include {{stream}} tag. --- docs/docs/templates.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/templates.md b/docs/docs/templates.md index cba4fdd..359de53 100644 --- a/docs/docs/templates.md +++ b/docs/docs/templates.md @@ -29,3 +29,4 @@ This template will be used to create the note text. You can use the following sy - `{{date}}`: The publish date of the podcast episode. - You can use `{{date:format}}` to specify a custom [Moment.js](https://momentjs.com) format. E.g. `{{date:YYYY-MM-DD}}`. - `{{artwork}}`: The URL of the podcast artwork. If no artwork is found, an empty string will be used. +- `{{stream}}`: The URL of the podcast audio file for the episode. From 1b5914b127c154948b516ca81fb4edfe925d62db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Mon, 8 Sep 2025 22:00:14 +0100 Subject: [PATCH 3/3] fix(TemplateEngine): Include the possibility of the stream url being empty I'm not sure if this is a possibility, but just want to cover this base, as I don't know what happens if null. --- src/TemplateEngine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TemplateEngine.ts b/src/TemplateEngine.ts index 078f61d..fff3636 100644 --- a/src/TemplateEngine.ts +++ b/src/TemplateEngine.ts @@ -100,7 +100,7 @@ export function NoteTemplateEngine(template: string, episode: Episode) { return htmlToMarkdown(episode.content); }); addTag("safetitle", replaceIllegalFileNameCharactersInString(episode.title)); - addTag("stream", episode.streamUrl); + addTag("stream", episode.streamUrl ?? ""); addTag("url", episode.url); addTag("date", (format?: string) => episode.episodeDate