diff options
author | morpheus65535 <[email protected]> | 2021-03-18 13:40:41 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-03-18 13:40:41 -0400 |
commit | 01b1fda8fcb60f97ac76420b9dec11ed6e8de54a (patch) | |
tree | 60f36b5188f7e85881f99fd9543b513ea8217574 | |
parent | 0ff83bb49ddab8eea44282f31c5296d3f268d7b3 (diff) | |
parent | 5fd241f17d8672d5db1e48896b70f10d1ee00918 (diff) | |
download | bazarr-01b1fda8fcb60f97ac76420b9dec11ed6e8de54a.tar.gz bazarr-01b1fda8fcb60f97ac76420b9dec11ed6e8de54a.zip |
Merge remote-tracking branch 'origin/development' into development
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | bazarr/get_providers.py | 12 |
2 files changed, 11 insertions, 3 deletions
@@ -1 +1 @@ -0.9.3-beta.13
\ No newline at end of file +0.9.3-beta.14
\ No newline at end of file diff --git a/bazarr/get_providers.py b/bazarr/get_providers.py index 1ab4c0496..f06f712a8 100644 --- a/bazarr/get_providers.py +++ b/bazarr/get_providers.py @@ -105,7 +105,7 @@ def get_providers(): logging.info("Using %s again after %s, (disabled because: %s)", provider, throttle_desc, reason) del tp[provider] set_throttled_providers(str(tp)) - + # if forced only is enabled: # fixme: Prepared for forced only implementation to remove providers with don't support forced only subtitles # for provider in providers_list: # if provider in PROVIDERS_FORCED_OFF: @@ -298,4 +298,12 @@ def set_throttled_providers(data): handle.write(data) -tp = eval(str(get_throttled_providers())) +try: + tp = eval(str(get_throttled_providers())) + if not isinstance(tp, dict): + raise ValueError('tp should be a dict') +except Exception: + logging.error("Invalid content in throttled_providers.dat. Resetting") + # set empty content in throttled_providers.dat + set_throttled_providers('') + tp = eval(str(get_throttled_providers())) |