From 557a06173df4239ab1bd089779c09b049fb41ac4 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sat, 19 Jun 2021 20:10:32 -0400 Subject: [PATCH] Fixed token issue with opensubtitles.com --- libs/subliminal_patch/providers/opensubtitlescom.py | 4 ++++ 1 file changed, 4 insertions(+) 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',