diff options
-rw-r--r-- | libs/subliminal_patch/providers/opensubtitlescom.py | 4 |
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', |