Skip to content

Commit 9c82578

Browse files
authored
Fix trakt episode sync (#11908)
1 parent 4f79d3f commit 9c82578

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

medusa/schedulers/trakt_checker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def sync_trakt_episodes(self):
592592
if not trakt_indexer:
593593
continue
594594

595-
indexer_id = trakt_show['ids'].get(trakt_indexer)
595+
indexer_id = watchlist_item['ids'].get(trakt_indexer)
596596
indexer = indexerConfig[i]['id']
597597
show = Show.find_by_id(app.showList, indexer, indexer_id)
598598
if show:
@@ -601,18 +601,18 @@ def sync_trakt_episodes(self):
601601
if not show:
602602
# If can't find with available indexers try IMDB
603603
trakt_indexer = get_trakt_indexer(EXTERNAL_IMDB)
604-
indexer_id = trakt_show['ids'].get(trakt_indexer)
604+
indexer_id = watchlist_item['ids'].get(trakt_indexer)
605605
show = Show.find_by_id(app.showList, EXTERNAL_IMDB, indexer_id)
606606
if not show:
607607
# If can't find with available indexers try TRAKT
608608
trakt_indexer = get_trakt_indexer(EXTERNAL_TRAKT)
609-
indexer_id = trakt_show['ids'].get(trakt_indexer)
609+
indexer_id = watchlist_item['ids'].get(trakt_indexer)
610610
show = Show.find_by_id(app.showList, EXTERNAL_TRAKT, indexer_id)
611611

612612
# If can't find show add with default trakt indexer
613613
if not show:
614614
trakt_indexer = get_trakt_indexer(trakt_default_indexer)
615-
indexer_id = trakt_show['ids'].get(trakt_indexer)
615+
indexer_id = watchlist_item['ids'].get(trakt_indexer)
616616
# Only add show if we didn't added it before
617617
if indexer_id not in added_shows:
618618
self.add_show(trakt_default_indexer, indexer_id, trakt_show['title'], SKIPPED)

0 commit comments

Comments
 (0)