diff options
author | morpheus65535 <[email protected]> | 2021-08-11 09:38:39 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-08-11 09:38:39 -0400 |
commit | c05db9f8c5731351304ec01aec9d7ad3ce3cebf8 (patch) | |
tree | 194dba7adaaf88bd5f459b5fe22e48899ff1e4ac | |
parent | c2059584db9ae3a3c19c3fcfe205f7d72b9e4fcf (diff) | |
download | bazarr-c05db9f8c5731351304ec01aec9d7ad3ce3cebf8.tar.gz bazarr-c05db9f8c5731351304ec01aec9d7ad3ce3cebf8.zip |
Added a validation of existing credentials for opensubtitles.com provider.
-rw-r--r-- | libs/subliminal_patch/providers/opensubtitlescom.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py index fd4bb6684..7d04a6026 100644 --- a/libs/subliminal_patch/providers/opensubtitlescom.py +++ b/libs/subliminal_patch/providers/opensubtitlescom.py @@ -124,6 +124,9 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): languages.update(set(Language.rebuild(l, forced=True) for l in languages)) def __init__(self, username=None, password=None, use_hash=True, api_key=None): + if not all((username, password)): + raise ConfigurationError('Username and password must be specified') + if not api_key: raise ConfigurationError('Api_key must be specified') |