summaryrefslogtreecommitdiffhomepage
path: root/libs/subliminal_patch
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-06-19 20:10:32 -0400
committermorpheus65535 <[email protected]>2021-06-19 20:10:32 -0400
commit557a06173df4239ab1bd089779c09b049fb41ac4 (patch)
tree001e88956c1cdf0cc2e710de47ea11b8f5e4249b /libs/subliminal_patch
parentd0c7c5d5e073c80af90569158c49072a87da89e6 (diff)
downloadbazarr-557a06173df4239ab1bd089779c09b049fb41ac4.tar.gz
bazarr-557a06173df4239ab1bd089779c09b049fb41ac4.zip
Fixed token issue with opensubtitles.com
Diffstat (limited to 'libs/subliminal_patch')
-rw-r--r--libs/subliminal_patch/providers/opensubtitlescom.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py
index ae25875cb..1f5c8d62e 100644
--- a/libs/subliminal_patch/providers/opensubtitlescom.py
+++ b/libs/subliminal_patch/providers/opensubtitlescom.py
@@ -322,6 +322,10 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
return self.query(languages, video)
def download_subtitle(self, subtitle):
+ if self.token is NO_VALUE:
+ logger.debug("No cached token, we'll try to login again.")
+ self.login()
+
logger.info('Downloading subtitle %r', subtitle)
headers = {'Accept': 'application/json', 'Content-Type': 'application/json',