Summary
When a show has older seasons paused and completes all known episodes in the current season, it becomes PartiallyCompleted and stops being monitored for new TVDB episodes. New episodes added to TVDB after this point are never discovered, even though the show is still airing (tvdb_status = "Continuing").
Steps to Reproduce
- Add a currently-airing show (e.g. Summer House, tvdb_status=Continuing)
- Pause older seasons (S1-S9) — only track the current season (S10)
- Wait for all known episodes in S10 to complete
- Show state becomes
PartiallyCompleted (Paused seasons + Completed season)
- TVDB adds new episodes (E11, E12, etc.)
- Riven never discovers them — no reindex is ever triggered again
Root Cause
Two interacting issues:
1. _determine_state in Show doesn't check TVDB status for the PartiallyCompleted case
The code already handles "all seasons completed but show still airing" correctly:
if all(season.state == States.Completed for season in self.seasons):
if self.tvdb_status and self.tvdb_status.lower() in ["continuing", "upcoming"]:
return States.Ongoing # correctly stays Ongoing
return States.Completed
But when any season is Paused, all(... == Completed) is False, so this check is never reached. The code falls through to:
if any(season.state in (States.Completed, States.PartiallyCompleted) ...):
return States.PartiallyCompleted # no TVDB status check here
2. _monitor_ongoing_schedules only monitors Ongoing/Unreleased shows
select(Show).where(Show.last_state.in_([States.Ongoing, States.Unreleased]))
PartiallyCompleted shows are excluded, so no reindex_show tasks are ever created for them.
Suggested Fix
In Show._determine_state, apply the TVDB continuing/upcoming check to the PartiallyCompleted branch as well — if any non-paused season is fully completed and the show is still airing on TVDB, it should remain Ongoing so the scheduler keeps monitoring it:
if any(season.state in (States.Completed, States.PartiallyCompleted) for season in self.seasons):
if self.tvdb_status and self.tvdb_status.lower() in ["continuing", "upcoming"]:
return States.Ongoing
return States.PartiallyCompleted
Environment
- Riven v1.0.0 (
spoked/riven:dev, image built 2026-04-11)
- PostgreSQL 17 Alpine
- Show tested: Summer House (TVDB 321121, tvdb_status=Continuing)
Summary
When a show has older seasons paused and completes all known episodes in the current season, it becomes
PartiallyCompletedand stops being monitored for new TVDB episodes. New episodes added to TVDB after this point are never discovered, even though the show is still airing (tvdb_status = "Continuing").Steps to Reproduce
PartiallyCompleted(Paused seasons + Completed season)Root Cause
Two interacting issues:
1.
_determine_stateinShowdoesn't check TVDB status for the PartiallyCompleted caseThe code already handles "all seasons completed but show still airing" correctly:
But when any season is Paused,
all(... == Completed)is False, so this check is never reached. The code falls through to:2.
_monitor_ongoing_schedulesonly monitors Ongoing/Unreleased showsPartiallyCompletedshows are excluded, so noreindex_showtasks are ever created for them.Suggested Fix
In
Show._determine_state, apply the TVDB continuing/upcoming check to thePartiallyCompletedbranch as well — if any non-paused season is fully completed and the show is still airing on TVDB, it should remainOngoingso the scheduler keeps monitoring it:Environment
spoked/riven:dev, image built 2026-04-11)