From 9c82578cc03b889e7cf77ae48d1935ef75e522c5 Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 5 Jan 2025 10:41:23 +0100 Subject: [PATCH] Fix trakt episode sync (#11908) --- medusa/schedulers/trakt_checker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/medusa/schedulers/trakt_checker.py b/medusa/schedulers/trakt_checker.py index a5d9ea2c87..f35d4d6354 100644 --- a/medusa/schedulers/trakt_checker.py +++ b/medusa/schedulers/trakt_checker.py @@ -592,7 +592,7 @@ def sync_trakt_episodes(self): if not trakt_indexer: continue - indexer_id = trakt_show['ids'].get(trakt_indexer) + indexer_id = watchlist_item['ids'].get(trakt_indexer) indexer = indexerConfig[i]['id'] show = Show.find_by_id(app.showList, indexer, indexer_id) if show: @@ -601,18 +601,18 @@ def sync_trakt_episodes(self): if not show: # If can't find with available indexers try IMDB trakt_indexer = get_trakt_indexer(EXTERNAL_IMDB) - indexer_id = trakt_show['ids'].get(trakt_indexer) + indexer_id = watchlist_item['ids'].get(trakt_indexer) show = Show.find_by_id(app.showList, EXTERNAL_IMDB, indexer_id) if not show: # If can't find with available indexers try TRAKT trakt_indexer = get_trakt_indexer(EXTERNAL_TRAKT) - indexer_id = trakt_show['ids'].get(trakt_indexer) + indexer_id = watchlist_item['ids'].get(trakt_indexer) show = Show.find_by_id(app.showList, EXTERNAL_TRAKT, indexer_id) # If can't find show add with default trakt indexer if not show: trakt_indexer = get_trakt_indexer(trakt_default_indexer) - indexer_id = trakt_show['ids'].get(trakt_indexer) + indexer_id = watchlist_item['ids'].get(trakt_indexer) # Only add show if we didn't added it before if indexer_id not in added_shows: self.add_show(trakt_default_indexer, indexer_id, trakt_show['title'], SKIPPED)