Files
silo-server/internal
1e36d42bcc fix(metadata): don't promote season/episode 404s to item-level stale provider IDs (#35)
* fix(metadata): don't promote season/episode 404s to item-level stale provider IDs

The main-refresh path in MetadataService.processInternal passes
`provider404s` to handleProvider404 for season (line 1140) and episode
(line 1173) fetch errors. handleProvider404 records the item's provider
ID as stale whenever provider404s is non-nil. A 404 fetching seasons or
episodes is a child-resource failure (e.g. TMDB returns 404 for
`/tv/{id}/season/0` when a series has no specials season) — it must not
mark the item's TMDB ID itself as stale.

The equivalent target-refresh paths (fetchTargetSeasonResults at line
2305 and fetchTargetEpisodeResults at line 2339) already pass `nil` for
this exact reason. The main-refresh path was the missing half of that
fix.

In our deployment this bug caused 13,524 series items to have their
`media_items.tmdb_id` cleared and recorded as stale during a single
refresh sweep — every series whose TMDB entry doesn't have a 'specials'
season was affected. Once recorded, `suppressRecordedStaleProviderIDs`
locked the items out of future TMDB enrichment.

Tested by curl-ing 5 affected items against TMDB directly:
- /tv/{id} returns 200 for all 5
- /season/1 returns 200 for all 5
- /season/0 returns 404 for 4 of 5 (the ones that don't have specials)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
2026-06-06 09:29:30 -04:00
..
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00