Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019NK5BSFsEuuqMcNPPpysee
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
selmant
added a commit
to selmant/better-trakt
that referenced
this pull request
Oct 23, 2026
…t.tv collection jellyfin#338 Original author: @zotabee. Thanks for the contribution!
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.
With "Don't remove from Trakt when deleted from Jellyfin" unticked, deleting a whole series left all its episodes in the trakt.tv collection.
CanSyncdrops the series' own removal, and by the time Jellyfin reports the episodes as removed they're no longer linked to their series (LibraryManager.cs), so they're dropped too.A series removal now sends one show-level remove to
/sync/collection/remove. Right before, it checks whether a series with the same ids is still in the library (another copy, or the show was moved) and keeps it collected if so. Show removals now run before episode adds, one batch at a time, so a show that was moved isn't removed after its episodes were added back. If the request for one show fails, the other shows are still sent; if trakt.tv can't be reached, times out or rejects the account (401, 403, 420, 423, 429, or 502 and above), the remaining shows aren't sent, since they would fail the same way.Tested in a harness (a deleted series is removed, a deleted season works as before, moved, renamed or duplicated HD + 4K series stay collected), and live on my Jellyfin 12.1 server: a test show with 4 episodes reached trakt.tv, and after its folder was deleted and the library scanned, the plugin logged
Processing 1 shows with event type Remove, sent one show-level remove, and the show left the collection. In the harness, when the first of three removals fails, a 500 still sends the other two, and a 401 or a locked account stops after the first.The requests in that harness case (three series deleted, trakt.tv answers 500 to the first), before and after the last commit:
Merges cleanly with #329 and #341, which change the same file.