summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-03-18 13:40:41 -0400
committermorpheus65535 <[email protected]>2021-03-18 13:40:41 -0400
commit01b1fda8fcb60f97ac76420b9dec11ed6e8de54a (patch)
tree60f36b5188f7e85881f99fd9543b513ea8217574
parent0ff83bb49ddab8eea44282f31c5296d3f268d7b3 (diff)
parent5fd241f17d8672d5db1e48896b70f10d1ee00918 (diff)
downloadbazarr-01b1fda8fcb60f97ac76420b9dec11ed6e8de54a.tar.gz
bazarr-01b1fda8fcb60f97ac76420b9dec11ed6e8de54a.zip
Merge remote-tracking branch 'origin/development' into development
-rw-r--r--VERSION2
-rw-r--r--bazarr/get_providers.py12
2 files changed, 11 insertions, 3 deletions
diff --git a/VERSION b/VERSION
index 9aafa8474..e8b8c2604 100644
--- a/VERSION
+++ b/VERSION
@@ -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()))