Fix: Include tvdb in .ids (omitted from the ids accessor list)#127
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
@yitzhaq why did your agent ignore commit guidelines?
at minimum tests must be a separate commit.
also, v := requires py 3.8 syntax, but this project supports 3.6
and why this change is neccessary? "Only ids present on the object are included", could be a lot easier code without this restriction.
|
Good question. My guess would be because it wasn't in the project root; it started out with the PTS repo before drilling down to where the fix actually should live, and something else even before that. I'll point it to it explicitly, and instruct it to take another pass. Sorry about that, and thanks for the heads up! |
IdsMixin.ids built its dict from a curated key list that omitted tvdb,
even though a tvdb property already exists on the mixin and Trakt returns
tvdb for shows. So obj.ids["ids"] never contained tvdb, breaking
tvdb-based id matching downstream: PlexTraktSync's search_by_id checks
m.ids["ids"].get("tvdb"), which was always None, so every show in a
library using the legacy TheTVDB Plex agent is rejected as "not found on
Trakt" even though m.tvdb is populated.
Add tvdb to the accessor list. tvdb is a TV-only id, so filter out None
values: shows/episodes gain tvdb while movies, people and other media
that lack it keep their existing .ids output unchanged (no null tvdb key).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regression for tvdb being omitted from the ids accessor list: assert a show exposes its tvdb both via .tvdb and in .ids["ids"]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d91181a to
49d93db
Compare
|
Thanks — addressed all three:
|
|
I'd accept null keys, because the other id's were not filtered for null, and now doing so, could be a breaking change. but i don't think anybody filters object like this. so, the current changes are LGTM as well. |
Problem
IdsMixin.idsbuilds{"ids": {...}}from a curated key list that omitstvdb, even though the mixin already exposes atvdbproperty and Trakt returnstvdbfor shows. Soobj.ids["ids"]never includes the tvdb id (whileobj.tvdbis populated).This breaks tvdb-based id matching in downstream consumers. Concretely, PlexTraktSync's
TraktApi.search_by_idvalidates the lookup result viam.ids["ids"].get(id_type); forid_type="tvdb"that is alwaysNone, so every show in a Plex library using the legacy TheTVDB agent is rejected as "not found on Trakt" — even though the show exists on Trakt andm.tvdbis correct. Refs Taxel/PlexTraktSync#2394, Taxel/PlexTraktSync#2360, Taxel/PlexTraktSync#2312.Change
tvdbto the ids accessor list.Nonevalues from the dict, so media types without a given id (e.g. movies have no tvdb) don't gain a null key. Existing output stays stable — all prior tests pass unchanged — while shows now expose their tvdb id.Testing
pytestgreen — 166 passed. The new test asserts a show's.ids["ids"]["tvdb"]is populated; the existing movie.idsequality tests still pass, confirming no nulltvdbleaks into media that lack it.🤖 Generated with Claude Code