Skip to content

fix: handle object form of themoviedb_id from Fribb data#927

Open
Arlind-dev wants to merge 1 commit into
beeequeue:mainfrom
Arlind-dev:fix/themoviedb-id-object-handling
Open

fix: handle object form of themoviedb_id from Fribb data#927
Arlind-dev wants to merge 1 commit into
beeequeue:mainfrom
Arlind-dev:fix/themoviedb-id-object-handling

Conversation

@Arlind-dev
Copy link
Copy Markdown

Summary

Fribb/anime-lists now ships themoviedb_id as an object ({tv?: number, movie?: number}) for entries that have a TMDB match — 8,381 of the current 42,142 entries. formatEntry still passes the value straight into handleBadValues, so the object reaches the SQLite bind step and crashes:

TypeError: Provided value cannot be bound to SQLite parameter 13.

The crash happens during the initial DB rebuild, so the container never reaches a serving state.

Fix: extract themoviedb_id.tv ?? themoviedb_id.movie when it's an object before handing it to handleBadValues. Type widened accordingly.

Test plan

  • Built from this branch, container started successfully, DB populated with 42,142 entries, /api/v2/ids?source=anidb&id=12665 returns themoviedb: 73223.

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