Skip to content

Match TMDBHelper 6.20.8: schema version 51 and NULL external IDs - #9

Merged
xbmc4lyfe merged 1 commit into
mainfrom
claude/addon-schema-v51
Nov 5, 2026
Merged

xbmc4lyfe merged 1 commit into
mainfrom
claude/addon-schema-v51

Conversation

@xbmc4lyfe

@xbmc4lyfe xbmc4lyfe commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Allen · project thread

Follows #7, which is now merged into main.

What changed upstream

I compared upstream plugin.video.themoviedb.helper at 3f2338b (v6.20.8, 2026-11-05) against our schema/ItemDetails.sql. I built both schemas and diffed every table, column, type, default, foreign key, unique constraint, and index. They match. Only two things differ:

  1. Version 50 to 51. Upstream raised database_version to 51 in f8bed2d2 without changing any table. The version 51 migration is now empty (b79e9b4d). TMDBHelper 6.20.2 and later bump our version 50 database to 51 without dropping anything. Our writer would then refuse that database.
  2. NULL external IDs. e2b52230 changed mappings.py, so a null external ID is now stored as NULL, not the text "None".

Expiry (30 days, 7 days for airing shows), datalevel, and the cache-hit conditions are unchanged. The other database changes (the item details service, ratings providers, Fanart.tv URL encoding on read, mmap size) don't change what's stored.

This PR

  • Writes version 51, and open_writer upgrades a version 50 database in place, so the crawl in progress keeps working after a rebuild.
  • Stores NULL for a null external ID. A real ID still replaces a "None" from an older build.
  • scripts/addon-schema.py reads tabledef.py with ast.literal_eval, so it doesn't run the add-on's code.
  • Regenerated schema/ItemDetails.sql and the test fixture. Only the version line changed. Updated the version note in the docs.

Testing

  • cargo test: all pass, including new tests for the version 50 upgrade, refusing unknown versions, NULL IDs, and replacing legacy "None".
  • cargo clippy --all-targets -- -D warnings: clean.
  • Vale wasn't available locally. The docs workflow runs it on this PR.

Generated by Claude Code

@xbmc4lyfe xbmc4lyfe self-assigned this Nov 5, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T12:24:19.463619Z bae310f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

TMDBHelper raised ItemDetails.db to version 51 without changing any
table, and now stores NULL instead of the text "None" for a missing
external ID.

- Write version 51, and upgrade a version 50 database in place, so a
  crawl in progress keeps working.
- Store NULL for a null external ID. A real ID still replaces a "None"
  that an older build left.
- Read the add-on's table definitions as data in addon-schema.py,
  instead of running its code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gZSSKSAXLazAYpSG4A
@xbmc4lyfe
xbmc4lyfe force-pushed the claude/addon-schema-v51 branch from 92a3214 to bae310f Compare November 5, 2026 12:22
@xbmc4lyfe
xbmc4lyfe changed the base branch from claude/addon-v50-full-cache to main November 5, 2026 12:23

Copy link
Copy Markdown
Contributor Author

@codex review


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: bae310f2b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@xbmc4lyfe
xbmc4lyfe merged commit c1bdd2a into main Nov 5, 2026
2 checks passed
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.

1 participant