Commit 7caa5324 authored by shadMod's avatar shadMod 💬

added debug param; set 'https' key

parent 6609d289
......@@ -36,7 +36,7 @@ CACHE_FILE_VERSION = 1
class Downloads:
def __init__(self, data_path):
def __init__(self, data_path, debug: bool = False):
# init _mirrors
self._mirrors = None
# Load the configuration
......@@ -51,7 +51,8 @@ class Downloads:
with open(path, "rb") as raw:
self._config_hash = "sha1=%s" % hashlib.sha1(raw.read()).hexdigest()
self._cache_file = os.path.join(data_path, CACHE_FILE)
if debug is False:
self._cache_file = os.path.join(data_path, CACHE_FILE)
@property
def _cache(self): # Cacheception
......@@ -210,7 +211,7 @@ class Downloads:
if torrent:
url = source["torrent"]
else:
url = source["http"]
url = source["https"]
for key, value in replaces.items():
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