-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix episode matching for sync from trakt task #191
Conversation
- Trakt has switched from tvdb to tmdb as indexer - Episodes are often not aligned between tvdb and tmdb - Watched shows api does not contain episodes ids - History api does contain episode ids - If no matching is found by season and number (from shows api), fallback to history api to determine a match by episode ids
When an episode is not matched with the season, let's find it in any season. This happens when an episode of the next season in tvdb appears in the previous season in tmdb. (F.e. Hunter X Hunter S02E01 tvdb = S01E59 tmdb)
I ran this updated plugin on my whole library and now watched status is properly imported! 🥳 |
Works perfectly after adding the latest commit. 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine but I haven't tested it since I don't have any unsynced items.
Not sure if you are following tvdb or tmdb seasoning... It's mainly a fix when seasoning is different. It now has a fallback to match by ids (instead of season and number) by using the history api from trakt. And it's a fallback, so existing logic still applies, I'm addtionally try to match further when no match is found on season and number. And I think a lot of people are still following tvdb, as it's the only indexer source used in the sonarr tool. 😉 |
The history api includes more details (i.e. indexer id) which can be used to properly match episodes (i.e. when jellyfin is using other indexer than trakt). Matching by indexer id is a lot more accurate than matching by season and number. This is a rework of jellyfin#191 where we are now using the history by default for episode sync.
Explanation:
Fixes #190