fix loop with alt titles in argenteam

pull/1155/head
vitiko98 4 years ago
parent 88265e7913
commit 517e5e22e5

@ -270,11 +270,14 @@ class ArgenteamProvider(Provider, ProviderSubtitleArchiveMixin):
else: else:
titles = [video.title] + video.alternative_titles titles = [video.title] + video.alternative_titles
inc = 0
for title in titles: for title in titles:
subs = self.query(title, video, titles=titles) subs = self.query(title, video, titles=titles)
if subs: if subs:
return subs return subs
inc += 1
if inc > 2:
break
time.sleep(self.multi_result_throttle) time.sleep(self.multi_result_throttle)
return [] return []

Loading…
Cancel
Save