Skip to content

fix: recompute Season/Episode stable UUID after meta enrichment#72

Merged
lostb1t merged 1 commit into
lostb1t:mainfrom
jackgdll:fix/recompute-episode-season-uuid-after-meta
Jun 29, 2026
Merged

fix: recompute Season/Episode stable UUID after meta enrichment#72
lostb1t merged 1 commit into
lostb1t:mainfrom
jackgdll:fix/recompute-episode-season-uuid-after-meta

Conversation

@jackgdll

Copy link
Copy Markdown
Contributor

Issue

  • skipping media item with invalid UUID ... UUID mismatch errors logged after library refresh
  • seasons/episodes mentioned in the errors never land in the DB, whole seasons of specials vanish.
  • skipped item's id encodes a season one higher than the stored parent_idx (same IMDB anchor, episode number unchanged)

Cause

  • AddonRuntime::refresh_meta re-derives the canonical UUID for Movie/Series only, not for Season/Episode.
  • The recompute block's comment says: "Catalog stubs arrive with a TMDB-keyed UUID; validate() expects the canonical one", it just was never extended to seasons/episodes.

Fix

  • addons/mod.rs: extend the UUID recompute to Movie | Series | Season | Episode, deriving the key via media.media_id_raw(), guarded on canonical().is_some().
  • db/media.rs: regression tests for episode and series ids

I used Claude to debug and fix this then manually reviewed it and wrote the PR description myself

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jackgdll jackgdll force-pushed the fix/recompute-episode-season-uuid-after-meta branch from 8729f1d to 4500dd6 Compare June 29, 2026 18:23
@jackgdll

jackgdll commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

i'm not sure whether Person should also be supported here or not?

@lostb1t

lostb1t commented Jun 29, 2026

Copy link
Copy Markdown
Owner

people are handled in a different location so this looks good

@lostb1t lostb1t merged commit 35f178d into lostb1t:main Jun 29, 2026
7 checks passed
lostb1t added a commit that referenced this pull request Jun 30, 2026
lostb1t added a commit that referenced this pull request Jun 30, 2026
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