mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-22 22:10:42 +00:00
Fix titulky's subtitle downloading logic
This commit is contained in:
parent
582c2d9b3c
commit
a82ab6769d
1 changed files with 5 additions and 1 deletions
|
@ -452,7 +452,11 @@ class TitulkyProvider(Provider, ProviderSubtitleArchiveMixin):
|
||||||
else:
|
else:
|
||||||
subtitle_content = fix_line_ending(res.content)
|
subtitle_content = fix_line_ending(res.content)
|
||||||
|
|
||||||
if not subtitle_content:
|
if archive and len(archive.infolist()) > 1 and not subtitle_content:
|
||||||
|
logger.info(f"Titulky.com: Couldn't find a proper subtitle file in the downloaded archive.")
|
||||||
|
elif archive and len(archive.infolist()) == 1 and not subtitle_content:
|
||||||
raise DownloadLimitExceeded("Subtitles download limit has been exceeded")
|
raise DownloadLimitExceeded("Subtitles download limit has been exceeded")
|
||||||
|
elif not subtitle_content:
|
||||||
|
raise ProviderError("No subtitles provided from titulky")
|
||||||
|
|
||||||
subtitle.content = subtitle_content
|
subtitle.content = subtitle_content
|
||||||
|
|
Loading…
Reference in a new issue