no log: Fix titulky provider TypeError (#1760)

This commit is contained in:
Samuel Bartík 2022-03-11 19:56:20 +01:00 committed by GitHub
parent 2b889fa975
commit 36f8472e28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ class TitulkyProvider(Provider, ProviderSubtitleArchiveMixin):
url,
timeout=self.timeout,
allow_redirects=False,
headers={'Referer': quote(ref)})
headers={'Referer': quote(ref) if ref else None}) # URL encode ref if it has value
# Check if we got redirected because login cookies expired.
# Note: microoptimization - don't bother parsing qs for non 302 responses.