|
|
@ -237,8 +237,13 @@ class OpenSubtitlesProvider(ProviderRetryMixin, _OpenSubtitlesProvider):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
query = [video.title] + video.alternative_titles
|
|
|
|
query = [video.title] + video.alternative_titles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if isinstance(video, Episode):
|
|
|
|
|
|
|
|
imdb_id = video.series_imdb_id
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
imdb_id = video.imdb_id
|
|
|
|
|
|
|
|
|
|
|
|
return self.query(video, languages, hash=video.hashes.get('opensubtitles'), size=video.size,
|
|
|
|
return self.query(video, languages, hash=video.hashes.get('opensubtitles'), size=video.size,
|
|
|
|
imdb_id=video.imdb_id, query=query, season=season, episode=episode, tag=video.original_name,
|
|
|
|
imdb_id=imdb_id, query=query, season=season, episode=episode, tag=video.original_name,
|
|
|
|
use_tag_search=self.use_tag_search, only_foreign=self.only_foreign,
|
|
|
|
use_tag_search=self.use_tag_search, only_foreign=self.only_foreign,
|
|
|
|
also_foreign=self.also_foreign)
|
|
|
|
also_foreign=self.also_foreign)
|
|
|
|
|
|
|
|
|
|
|
@ -255,12 +260,13 @@ class OpenSubtitlesProvider(ProviderRetryMixin, _OpenSubtitlesProvider):
|
|
|
|
criteria.append({'imdbid': imdb_id[2:], 'season': season, 'episode': episode})
|
|
|
|
criteria.append({'imdbid': imdb_id[2:], 'season': season, 'episode': episode})
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
criteria.append({'imdbid': imdb_id[2:]})
|
|
|
|
criteria.append({'imdbid': imdb_id[2:]})
|
|
|
|
if query and season and episode:
|
|
|
|
# Commented out after the issue with episode released after October 17th 2020.
|
|
|
|
for q in query:
|
|
|
|
# if query and season and episode:
|
|
|
|
criteria.append({'query': q.replace('\'', ''), 'season': season, 'episode': episode})
|
|
|
|
# for q in query:
|
|
|
|
elif query:
|
|
|
|
# criteria.append({'query': q.replace('\'', ''), 'season': season, 'episode': episode})
|
|
|
|
for q in query:
|
|
|
|
# elif query:
|
|
|
|
criteria.append({'query': q.replace('\'', '')})
|
|
|
|
# for q in query:
|
|
|
|
|
|
|
|
# criteria.append({'query': q.replace('\'', '')})
|
|
|
|
if not criteria:
|
|
|
|
if not criteria:
|
|
|
|
raise ValueError('Not enough information')
|
|
|
|
raise ValueError('Not enough information')
|
|
|
|
|
|
|
|
|
|
|
|