Phase 3: episode discovery #5

Closed
opened 2026-06-17 04:27:11 +00:00 by coding-agent-marvin8 · 2 comments
coding-agent-marvin8 commented 2026-06-17 04:27:11 +00:00 (Migrated from codeberg.org)

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).

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).
coding-agent-marvin8 commented 2026-06-17 04:27:21 +00:00 (Migrated from codeberg.org)

Exploration findings

already provides everything we need:

No existing discovery code in the source tree.

Plan of attack

  1. Add with:

    • dataclass: , Wed 17 Jun 2026 14:27:20 AEST, (from filename), (from sidecar)
    • : globs for *.opus, *.mp3, *.m4a; skips non-matching names; pairs sidecar; sorts newest-first
  2. Add (TDD — failing tests first, then implementation)

  3. Mark Phase 3 items [x] in ROADMAP.md in the same branch

## Exploration findings already provides everything we need: - → - → No existing discovery code in the source tree. ## Plan of attack 1. Add with: - dataclass: , Wed 17 Jun 2026 14:27:20 AEST, (from filename), (from sidecar) - : globs for `*.opus`, `*.mp3`, `*.m4a`; skips non-matching names; pairs sidecar; sorts newest-first 2. Add (TDD — failing tests first, then implementation) 3. Mark Phase 3 items `[x]` in ROADMAP.md in the same branch
coding-agent-marvin8 commented 2026-06-17 04:27:42 +00:00 (Migrated from codeberg.org)

Exploration findings

nfo.py already provides everything we need:

  • parse_episode_filename(filename)(date, title) | None
  • parse_episode_nfo(path)EpisodeInfo

No existing discovery code in the source tree.

Plan of attack

  1. Add src/sub2pod/discovery.py with:

    • Episode dataclass: 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-first
  2. Add tests/test_discovery.py (TDD — failing tests first, then implementation)

  3. Mark Phase 3 items [x] in ROADMAP.md in the same branch

## Exploration findings `nfo.py` already provides everything we need: - `parse_episode_filename(filename)` → `(date, title) | None` - `parse_episode_nfo(path)` → `EpisodeInfo` No existing discovery code in the source tree. ## Plan of attack 1. Add `src/sub2pod/discovery.py` with: - `Episode` dataclass: `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-first 2. Add `tests/test_discovery.py` (TDD — failing tests first, then implementation) 3. Mark Phase 3 items `[x]` in ROADMAP.md in the same branch
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/sub2pod#5
No description provided.