feat: move file metadata reading to sync service #75

Merged
joezombie merged 2 commits from feat/move-metadata-to-sync-service into main 2026-02-14 22:00:44 +00:00
joezombie commented 2026-02-14 21:47:40 +00:00 (Migrated from github.com)

Summary

  • Move ID3 tag reading from PodcastFeedService to SyncDirectoryAsync — metadata (title, duration, file size) is now read once during directory sync and persisted in the Episode entity, instead of being re-read on every RSS feed generation
  • Add Title, DurationSeconds, FileSize columns to Episode entity with EF Core migration; YouTube metadata unconditionally overwrites ID3 values to enforce priority
  • Simplify PodcastFeedService to pure DB reads — removed TagLib dependency, directory scanning, and SortEpisodesAsync; feed generation now queries episodes from DB with file-existence check and fallbacks for null fields

Test plan

  • dotnet build compiles with 0 errors/warnings
  • dotnet test — all 163 tests pass (6 new tests added)
  • Run app, verify /feed/{name} RSS output includes <itunes:duration>, <title>, <enclosure length> from DB
  • Verify YouTube metadata overrides ID3 values when both are present
  • Verify existing episodes get metadata backfilled on first sync after migration

🤖 Generated with Claude Code

## Summary - **Move ID3 tag reading from PodcastFeedService to SyncDirectoryAsync** — metadata (title, duration, file size) is now read once during directory sync and persisted in the Episode entity, instead of being re-read on every RSS feed generation - **Add Title, DurationSeconds, FileSize columns to Episode entity** with EF Core migration; YouTube metadata unconditionally overwrites ID3 values to enforce priority - **Simplify PodcastFeedService to pure DB reads** — removed TagLib dependency, directory scanning, and SortEpisodesAsync; feed generation now queries episodes from DB with file-existence check and fallbacks for null fields ## Test plan - [x] `dotnet build` compiles with 0 errors/warnings - [x] `dotnet test` — all 163 tests pass (6 new tests added) - [ ] Run app, verify `/feed/{name}` RSS output includes `<itunes:duration>`, `<title>`, `<enclosure length>` from DB - [ ] Verify YouTube metadata overrides ID3 values when both are present - [ ] Verify existing episodes get metadata backfilled on first sync after migration 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.