Skip to content

Default download.path is empty, breaking the Download command (writes ".mp3" to vault root, 2nd download fails) #183

Closed

Description

@chhoumann

Summary

DEFAULT_SETTINGS.download.path is "" (src/constants.ts), which makes the regular Download episode command resolve every episode to the path .mp3 at the vault root.

Why it's broken

With an empty download path template, DownloadPathTemplateEngine("") returns "", so createEpisodeFile writes to `${""}.${ext}` → .mp3 (a dotfile at the vault root):

  • Obsidian does not index dotfiles at the vault root: app.vault.getAbstractFileByPath(".mp3") returns null even though the file exists on disk. (Verified in the real app.)
  • The first download of any episode silently creates a junk .mp3 at the vault root.
  • The second download of any episode throws "File already exists" from app.vault.createBinary(".mp3", …), so the user sees Failed to create file for downloaded episode "…" and can never download a second episode until they manually delete the hidden .mp3.

Any non-empty template that lacks a per-episode token (e.g. Downloads → Downloads.mp3) collides in the same way.

Suggested fix

  • Give download.path a sensible per-episode default that includes {{title}} (and probably {{podcast}}), e.g. PodNotes/{{podcast}}/{{title}}, with a settings migration for users still on the empty default.
  • Consider validating/warning when the configured download path is empty or lacks {{title}}.

Context / relationship to #107

This shares a root cause with #107 (a non-unique download path), but affects the Download command rather than transcription. #107 (PR #182) makes transcription immune by resolving audio per-episode via getEpisodeAudioBuffer and no longer consulting download.path; it deliberately does not change the default or touch the Download command, to keep that fix focused and avoid settings-migration blast radius. This issue tracks the remaining Download-command problem.

Note: pre-existing junk .mp3 files already written to users' vaults are intentionally left for manual cleanup rather than auto-deleted.

Activity

  1. github-actions commented on Jun 22, 2026

    @github-actions
    Contributor

    🎉 This issue has been resolved in version 2.17.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  2. chhoumann commented on Oct 11, 2026

    @chhoumann
    OwnerAuthor

    Re-checked on current master (07b2812, PodNotes 2.20.2) in Obsidian 1.13.7 on desktop Linux, in an isolated test vault.

    Steps: kept the default download path and downloaded two episodes of the same podcast.

    Result: fixed. The default is now PodNotes/{{podcast}}/{{title}}, and the two episodes land at separate files with no "File already exists" error. An empty template also falls back to the episode title, and the old empty default is migrated.

    vault files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions