feat(stremio): keep the tvdb id an episode arrives with - #360
Draft
sean-wils wants to merge 2 commits into
Draft
Conversation
Cinemeta carries `tvdb_id` on every video and remux threw it away twice: the field was never deserialised, and `stremio_meta_episode` rebuilt `external_ids` from scratch with only the stremio id on it. That id is the only one an episode row carries that names it to anyone else. TMDB's season listing has no `external_ids` per episode, so without it an episode reaches a provider identified by nothing at all, and the library it was found on had 163,545 episodes in exactly that state. The wire name is snake_case against the struct's `rename_all`, so the test covers the deserialise as well as the mapping.
Contributor
Author
|
This isn't a perfect solution. It resolved about 50% of the episodes to scrobble to Yamtrack. |
sean-wils
marked this pull request as draft
August 27, 2026 08:21
`stremio_meta_to_medias` builds episodes by its own route rather than through `stremio_meta_episode`, in two near-identical blocks, so an import that went through it still dropped the id. The duplication is what hid it. `stremio_meta_episode` is already the extracted form of this, and folding the other two into it is worth doing separately: it guards the id and UUID rewrite on the series carrying an imdb or stremio id, and attaches episode relations, so it would change episode identity on the path that has neither.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #207.
Cinemeta sends
tvdb_idon every video and it was dropped twice: the field was never deserialised, andstremio_meta_episoderebuiltexternal_idswith only the stremio id on it.That is the only id an episode row carries that names it outside remux. Over 150,000 episodes in the library I tested had none.
Tested: The Bob Hope Show went from 0 of 268 episodes with a tvdb id to 56, matching what Cinemeta has.
Only helps if Cinemeta is configured. AIOStreams and AIOMetadata both send no tvdb ids.
#363 is the follow-up for episodes no addon carries an id for.