Repository navigation
Description
Summary
EpisodeHasIncompleteMetadata treats a provider-supplied episode as "incomplete" when its
title is Episode N/TBA/TBD or its overview is empty. But for a large class of real
content (British dramas, daily/talk shows, much anime, sports), that is the provider's
actual, complete data — TVDB/TMDB legitimately store the title as "Episode 1" and carry no
overview. The result: these series are flagged episode_metadata_incomplete=true permanently,
can never be cleared by a refresh, and continuously regenerate episode refresh debt — driving
wasted provider calls and refresh load with zero benefit.
Observed behavior
- Refreshing an affected series does not clear the flag: the provider returns the same
numbered title / empty overview, so the completeness check immediately re-asserts
episode_metadata_incomplete. - Many affected episodes are already matched to a provider (they carry
tvdb_id/tmdb_id,
often with an overview) and are titled "Episode N" only because that is the provider's real
title. - Example — Beyond Paradise (BBC drama):
S/E title tvdb_id tmdb_id overview source S1E1 Episode 19607609 3812334 present provider S1E2 Episode 29607610 4234096 present provider S0E1 Christmas Special 202310167141 4964644 present provider The numbered episodes are matched, have overviews, and Episode 1is TVDB's genuine title —yet the series is flagged incomplete with no way to clear it.
Root cause
internal/metadata/episode_completeness.go — EpisodeHasIncompleteMetadata():
if IsEpisodePlaceholderTitle(ep.Title) { return true } // ^(tba|tbd|episode\s+\d+)$
...
if strings.TrimSpace(ep.Overview) == "" { return true }These checks don't distinguish "we haven't fetched provider data yet" (actionable) from
"the provider's actual data is a numbered title / has no overview" (terminal). The flag,
set in refreshSeriesEpisodeMetadataState (internal/metadata/service.go:3469), then feeds
syncVisibleEpisodeRefreshDebt, internal/adminjob/library_refresh.go:112, and the items API
(internal/api/handlers/items.go:143), so the spurious "incomplete" propagates into refresh
scheduling and UX.
Impact
- The flag is not trustworthy — series whose episodes are as complete as the provider allows are
marked incomplete. - Affected series never clear, so they continuously regenerate episode refresh debt → repeated
provider calls that change nothing and add avoidable refresh-task load (a contributor to
context deadlinesaturation during metadata refreshes).
Proposed fix
Gate the placeholder-title and empty-overview checks on provenance. When an episode is
provider-sourced (metadata_source != "scanner_fallback" and it carries a provider ID),
a numbered title or absent overview is the provider's real data and should not count as
incomplete. Reserve "incomplete" for episodes that are scanner-fallback / never matched / never
fetched. (Optionally: track a "provider has no richer data" marker so a successful refresh that
returns a numbered title/empty overview clears the flag instead of re-flagging.)
Acceptance criteria
- A provider-matched episode whose only "issue" is a
Episode Ntitle or empty overview does
not setepisode_metadata_incomplete. - Refreshing such a series clears the flag and stops regenerating episode refresh debt.
- Genuinely-missing cases (unmatched/scanner-fallback episodes) are still flagged.
Activity
Quick104 commentedon Jun 7, 2026
Validated and implemented a fix in draft PR #60: #60
The fix separates broad episode metadata incompleteness from actionable refresh debt. Provider-matched episodes with a provider ID no longer regenerate refresh debt solely because the canonical provider title is
Episode Nor the overview is empty. Empty titles, scanner fallback rows, missing provider IDs, providerTBA/TBD, and recent episodes missing still images still produce actionable debt.Validation run:
go test ./internal/metadata ./internal/api/handlers ./internal/adminjob -count=1go test ./...make verify-local-paths