Skip to content

Fix three poster bugs in edititem: rematch skips poster update, TVDB cache key collision, movie poster lookup wrong path#183

Merged
Kallb123 merged 2 commits into
mainfrom
copilot/fix-metadata-and-poster-issues
Jun 2, 2026
Merged

Fix three poster bugs in edititem: rematch skips poster update, TVDB cache key collision, movie poster lookup wrong path#183
Kallb123 merged 2 commits into
mainfrom
copilot/fix-metadata-and-poster-issues

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

After the TMDB refactor, the edit-item screen has three independent poster bugs: rematching a show/movie never updates the poster image, manually selecting a different TVDB poster often silently returns the cached wrong one, and movie posters don't appear in the edit screen at all until a new poster is downloaded.

Changes

  • Rematch now downloads and applies the poster (handleApplyTmdbRematch / handleApplyTvdbRematch)
    Both handlers updated the provider ID but explicitly skipped poster changes. Now downloads the poster from the matched result and calls applyPoster immediately. Failure is caught as a warning so it doesn't abort the rematch.

  • TVDB poster cache key includes URL-derived suffix (downloadTvdbPoster)
    Cache file was keyed only on TVDB series ID, so any second poster selection for the same series returned the first cached file. Key is now {tvdbId}_{url_filename} so each distinct artwork URL gets its own file.

  • Movie poster lookup uses parsedPath not path (currentLibraryPoster)
    m.path is the raw encoded SAF URI; itemKey contains the decoded parsedPath. They never matched, so the poster always appeared blank. Changed to m.parsedPath, consistent with every other movie lookup in the file.

// Before — encoded m.path never equals the decoded itemKey segment
movies.find((m) => m.path === path)?.poster

// After
movies.find((m) => m.parsedPath === path)?.poster

Fix #182

… collision, movie poster lookup uses wrong path
Copilot AI changed the title Fix poster bugs: rematch doesn't update poster, TVDB cache key collision, movie poster lookup uses wrong path Fix three poster bugs in edititem: rematch skips poster update, TVDB cache key collision, movie poster lookup wrong path Jun 1, 2026
Copilot AI requested a review from Kallb123 June 1, 2026 23:45
@Kallb123 Kallb123 marked this pull request as ready for review June 2, 2026 05:55
@Kallb123 Kallb123 merged commit f7116a5 into main Jun 2, 2026
1 check passed
@Kallb123 Kallb123 deleted the copilot/fix-metadata-and-poster-issues branch June 2, 2026 05:57
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.

Posters behaviour is inconsistent

2 participants