Skip to content

fix(omdb): stop sending a series release's year to OMDb - #106

Merged
WarlaxZ merged 1 commit into
mainfrom
fix/omdb-series-year
Sep 1, 2026
Merged

WarlaxZ merged 1 commit into
mainfrom
fix/omdb-series-year

Conversation

@WarlaxZ

@WarlaxZ WarlaxZ commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Found while visually verifying the show/season nesting work in #105 — "The Boys" and "The Boys S05" were both showing a poster that had nothing to do with the actual show, despite the app resolving the correct IMDb ID for a simplified query.

Root cause: fetchTitleMetaByName sends the release's parsed year to OMDb's y= parameter unconditionally. For a film that's correct and necessary — "Ashfall" 1999 and "Ashfall" 2024 are different films, and y= is what tells OMDb which one. But a series release's embedded year is a different kind of fact: it's usually when the release's own season aired, not when the show debuted, and OMDb keys a series by the latter.

The actual release name behind this bug: The Boys S05 Season 5 2026 1080p AMZN WEBRip AAC5.1 10bits x265-Rapta — parses year: 2026, the season's own air year. Verified directly against the running server:

release=...2026...           → imdbId: tt38593439 (an unrelated 1910s-Ottoman-Empire title)
release=The Boys S05 (no year) → imdbId: tt1190634 (the correct show)

OMDb has no "The Boys" answering to y=2026, so the exact-match search comes back empty and falls back to an unrelated title that does happen to answer that year — wrong imdbId, wrong plot, wrong poster. Every season of a long-running or returning show carries a different embedded year, so this wasn't one show's edge case — it was every poster/plot lookup for any series whose current season aired later than its debut year.

Fix

fetchTitleMetaByName (src/recc/omdb.ts) now drops year for type: "series" before building either OMDb query it can send — the primary lookup and the episode-then-series-poster fallback. This is shared by both front ends (the terminal calls it directly, the browser via /api/title), so one change fixes it everywhere title metadata is fetched by name.

Test plan

  • npm test (3267 passing — updated the existing "builds a title lookup with year and type" test to a film-specific case where sending the year is still correct, and added a new test proving a series drops it)
  • npm run typecheck
  • npm run lint (only the known pre-existing App.tsx warning)
  • npm run build
  • Live-verified against the running server and the actual release name from the bug report: imdbId now resolves to tt1190634 (the correct show) instead of the unrelated title, and the poster shown in the app for both "The Boys" and "The Boys S05" is now correct

🤖 Generated with Claude Code

https://claude.ai/code/session_011QTsg7ie21bP9JpEPFMkyP

A film's OMDb year IS its identity — "Ashfall" 1999 and "Ashfall"
2024 are different films, and y= is what tells OMDb which one — but
a SERIES release's embedded year is not the same kind of fact. It is
usually when the release's own season aired, not when the show
debuted, and OMDb keys a series by the latter.

"The Boys S05 Season 5 2026 1080p AMZN WEBRip..." parses year 2026 —
the season's own air year. OMDb has no "The Boys" answering to y=2026,
so the exact-match search comes back empty and falls back to an
unrelated title that does happen to answer that year: wrong imdbId,
wrong plot, wrong poster, on a title whose IMDb id and artwork
torlink otherwise resolves correctly. Every season of a long-running
or returning show carries a different embedded year, so this was not
one show's edge case — it was every poster lookup for any series
whose current season aired later than its debut.

fetchTitleMetaByName now drops year for type: "series" before
building either OMDb query it can send (the primary lookup and the
episode-then-series-poster fallback). Shared by both front ends, so
one change fixes it everywhere the terminal and the browser fetch
title metadata by name.

Found while verifying the show/season nesting work in a separate PR
— "The Boys" and "The Boys S05" were both showing a poster that had
nothing to do with the actual show.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QTsg7ie21bP9JpEPFMkyP
@WarlaxZ
WarlaxZ merged commit 06af96b into main Sep 1, 2026
6 checks passed
@WarlaxZ
WarlaxZ deleted the fix/omdb-series-year branch September 1, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants