Repository navigation
sync: send a show's own rating on add_to_ratings - #320
Merged
Merged
Conversation
ListToItems took a show's rating and rated_at from whichever item of the show came first, so an episode or season rating could replace the show's own. add_to_ratings also sent the nested seasons, where Trakt now (trakt-api 87e75e5) rates those instead of the show. Shows now carry only their own rating; season and episode ratings keep going in their own lists with their ids.
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.
Fixed
sync -a add_to_ratings -t showsor-t all, with an export that also holds season or episode ratings:-t shows, season ratings were dropped, and episode ratings went inside the show. Under the contract (trakt-api87e75e5), that rates those episodes instead of the show.Now a show carries only its own
ratingandrated_at. Seasons and episodes keep going in their own lists with their ids.-t showsmeans show ratings only, as in the docs example.The contract's new nested form isn't used: our exports always have season and episode ids, and the flat lists already work.
rated_atwas already sent for every type.Live check on 2026-10-31: re-sending the maintainer's own ratings export (6 ratings, including a show with a rated season and episode) with
-t showsand-t allgotnot_foundempty both times, and a fresh export afterwards was identical. The case where a season or episode rating differs from the show's own is covered by a mock test, which fails without the fix.An AI assistant (Claude Code) found the bug, wrote the fix, the tests and the live-check script, and drafted this description.