From c5356d6dd0da24b5e067104bd121f2b6bb595600 Mon Sep 17 00:00:00 2001 From: reconman Date: Sun, 14 Jan 2024 16:56:06 +0100 Subject: [PATCH] Handle TMDB One Piece if custom mapping is present #212 --- plexanisync/anilist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexanisync/anilist.py b/plexanisync/anilist.py index 0e0ce8a..dcede1a 100644 --- a/plexanisync/anilist.py +++ b/plexanisync/anilist.py @@ -90,7 +90,8 @@ def match_to_plex(self, anilist_series: List[AnilistSeries], plex_series_watched continue # For multiple seasons with the same id # If the start of this season has been mapped use that. - if mapped_start != 1: + # Also use the watched episode count directly for series like TMDB One Piece + if mapped_start != 1 or plex_season.first_episode > match.watched_episodes: match.watched_episodes = plex_season.watched_episodes - mapped_start + 1 else: match.watched_episodes += plex_season.watched_episodes