Skip to content

feat(stremio): keep the tvdb id an episode arrives with - #360

Draft
sean-wils wants to merge 2 commits into
lostb1t:mainfrom
sean-wils:feat/stremio-episode-tvdb-ids
Draft

feat(stremio): keep the tvdb id an episode arrives with#360
sean-wils wants to merge 2 commits into
lostb1t:mainfrom
sean-wils:feat/stremio-episode-tvdb-ids

Conversation

@sean-wils

@sean-wils sean-wils commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Towards #207.

Cinemeta sends tvdb_id on every video and it was dropped twice: the field was never deserialised, and stremio_meta_episode rebuilt external_ids with 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.

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.
@sean-wils

Copy link
Copy Markdown
Contributor Author

This isn't a perfect solution. It resolved about 50% of the episodes to scrobble to Yamtrack.
Will also test whether syncing TheTVDB will help.

`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.
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