Commit 7caa5324 authored by shadMod's avatar shadMod 💬

added debug param; set 'https' key

parent 6609d289
...@@ -36,7 +36,7 @@ CACHE_FILE_VERSION = 1 ...@@ -36,7 +36,7 @@ CACHE_FILE_VERSION = 1
class Downloads: class Downloads:
def __init__(self, data_path): def __init__(self, data_path, debug: bool = False):
# init _mirrors # init _mirrors
self._mirrors = None self._mirrors = None
# Load the configuration # Load the configuration
...@@ -51,6 +51,7 @@ class Downloads: ...@@ -51,6 +51,7 @@ class Downloads:
with open(path, "rb") as raw: with open(path, "rb") as raw:
self._config_hash = "sha1=%s" % hashlib.sha1(raw.read()).hexdigest() self._config_hash = "sha1=%s" % hashlib.sha1(raw.read()).hexdigest()
if debug is False:
self._cache_file = os.path.join(data_path, CACHE_FILE) self._cache_file = os.path.join(data_path, CACHE_FILE)
@property @property
...@@ -210,7 +211,7 @@ class Downloads: ...@@ -210,7 +211,7 @@ class Downloads:
if torrent: if torrent:
url = source["torrent"] url = source["torrent"]
else: else:
url = source["http"] url = source["https"]
for key, value in replaces.items(): for key, value in replaces.items():
url = url.replace("{%s}" % key, value) url = url.replace("{%s}" % key, value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment