|
|
|
@ -178,14 +178,13 @@ class Addic7edProvider(_Addic7edProvider):
|
|
|
|
|
:rtype: int
|
|
|
|
|
"""
|
|
|
|
|
show_id = None
|
|
|
|
|
show_ids = {sanitize(series).lower(), sanitize(series.replace(".", "")).lower()}
|
|
|
|
|
logger.debug("Trying show ids: %s", show_ids)
|
|
|
|
|
for series_sanitized in show_ids:
|
|
|
|
|
if not ignore_cache:
|
|
|
|
|
show_ids = self._get_show_ids()
|
|
|
|
|
else:
|
|
|
|
|
show_ids = self._get_show_ids.refresh(self)
|
|
|
|
|
ids_to_look_for = {sanitize(series).lower(), sanitize(series.replace(".", "")).lower()}
|
|
|
|
|
show_ids = self._get_show_ids()
|
|
|
|
|
if ignore_cache or not show_ids:
|
|
|
|
|
show_ids = self._get_show_ids.refresh(self)
|
|
|
|
|
|
|
|
|
|
logger.debug("Trying show ids: %s", ids_to_look_for)
|
|
|
|
|
for series_sanitized in ids_to_look_for:
|
|
|
|
|
# attempt with country
|
|
|
|
|
if not show_id and country_code:
|
|
|
|
|
logger.debug('Getting show id with country')
|
|
|
|
@ -265,6 +264,9 @@ class Addic7edProvider(_Addic7edProvider):
|
|
|
|
|
|
|
|
|
|
logger.debug('Found %d show ids', len(show_ids))
|
|
|
|
|
|
|
|
|
|
if not show_ids:
|
|
|
|
|
raise Exception("Addic7ed: No show IDs found!")
|
|
|
|
|
|
|
|
|
|
return show_ids
|
|
|
|
|
|
|
|
|
|
@region.cache_on_arguments(expiration_time=SHOW_EXPIRATION_TIME)
|
|
|
|
@ -364,7 +366,7 @@ class Addic7edProvider(_Addic7edProvider):
|
|
|
|
|
|
|
|
|
|
# ignore incomplete subtitles
|
|
|
|
|
status = cells[5].text
|
|
|
|
|
if status != 'Completed':
|
|
|
|
|
if "%" in status:
|
|
|
|
|
logger.debug('Ignoring subtitle with status %s', status)
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|