diff options
author | morpheus65535 <[email protected]> | 2021-05-27 11:17:20 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-05-27 11:17:20 -0400 |
commit | 7209bad0c4ca2ae090c239b0b72a349ef2fcf8bd (patch) | |
tree | 9e5b8a3189491bc8905264f453593bf744a38de9 | |
parent | bb842b92af4049e4ac1d342aaf4a960b8b0bba09 (diff) | |
download | bazarr-7209bad0c4ca2ae090c239b0b72a349ef2fcf8bd.tar.gz bazarr-7209bad0c4ca2ae090c239b0b72a349ef2fcf8bd.zip |
Improved Opensubtitles.com provider caching of token
-rw-r--r-- | libs/subliminal_patch/providers/opensubtitlescom.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py index 69e874ec4..30418d022 100644 --- a/libs/subliminal_patch/providers/opensubtitlescom.py +++ b/libs/subliminal_patch/providers/opensubtitlescom.py @@ -145,14 +145,13 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): self.use_hash = use_hash def initialize(self): - self.token = region.get("oscom_token") + self.token = region.get("oscom_token", expiration_time=TOKEN_EXPIRATION_TIME) if self.token is NO_VALUE: self.login() def terminate(self): self.session.close() - @region.cache_on_arguments(expiration_time=TOKEN_EXPIRATION_TIME) def login(self): try: r = self.session.post(self.server_url + 'login', |