def find_show_match(self, indexer, indexer_id): traktShow = None try: library = TraktAPI()["sync/collection"].shows() or {} if not library: sickrage.app.log.debug( "No shows found in your library, aborting library update") return traktShow = [ x for __, x in library.items() if int(indexer_id) == int(x.ids[IndexerApi(indexer).trakt_id]) ] except Exception as e: sickrage.app.log.warning( "Could not connect to Trakt service. Aborting library check. Error: %s" % repr(e)) return traktShow
def find_show_match(self, series_provider_id, series_id): trakt_show = None try: library = TraktAPI()["sync/collection"].shows() or {} if not library: sickrage.app.log.debug( "No shows found in your library, aborting library update") return trakt_show = [ x for __, x in library.items() if int(series_id) == int(x.ids[ sickrage.app.series_providers[series_provider_id].trakt_id] ) ] except Exception as e: sickrage.app.log.warning( f"Could not connect to Trakt service. Aborting library check. Error: {repr(e)}" ) return trakt_show