Dashboard shows 0 episodes - central database not synced with per-feed databases #57
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
joezombie/castr#57
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?
Description
The Dashboard shows 0 episodes even when there are episodes in the RSS feed. The Feeds list also shows 0 episodes for all feeds.
Root Cause
There are two separate database systems that aren't kept in sync:
Per-feed databases (
{feed_directory}/podcast.db)PodcastFeedService(RSS feed generation)Central database (
/data/castr.db)The migration from per-feed to central database only runs ONCE at startup when the central database has no feeds. After initial migration, new episodes are never synced.
Affected Code
Dashboard episode counting (uses central DB):
RSS feed generation (uses per-feed DB):
Solution Options
Option 1: Sync on startup (quick fix)
Add periodic sync from per-feed databases to central database:
Option 2: Update PodcastFeedService to use central database
Modify
PodcastFeedServiceto useICentralDatabaseServiceinstead ofIPodcastDatabaseService.Option 3: Dual-write to both databases
Have
PlaylistWatcherServicewrite to both databases.Acceptance Criteria