Phase 3: episode discovery #5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Walk a channel directory, collect date-prefixed audio files (.opus, .mp3, .m4a), pair each with its .nfo sidecar where present, and return episodes sorted newest-first by date prefix (not mtime).
Exploration findings
already provides everything we need:
No existing discovery code in the source tree.
Plan of attack
Add with:
*.opus,*.mp3,*.m4a; skips non-matching names; pairs sidecar; sorts newest-firstAdd (TDD — failing tests first, then implementation)
Mark Phase 3 items
[x]in ROADMAP.md in the same branchExploration findings
nfo.pyalready provides everything we need:parse_episode_filename(filename)→(date, title) | Noneparse_episode_nfo(path)→EpisodeInfoNo existing discovery code in the source tree.
Plan of attack
Add
src/sub2pod/discovery.pywith:Episodedataclass:audio_path,date,title(from filename),info: EpisodeInfo | None(from sidecar)discover_episodes(channel_dir): globs for*.opus,*.mp3,*.m4a; skips non-matching names; pairs sidecar; sorts newest-firstAdd
tests/test_discovery.py(TDD — failing tests first, then implementation)Mark Phase 3 items
[x]in ROADMAP.md in the same branch