summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/Py_Load_File.py4
-rw-r--r--module/file_list.py4
-rw-r--r--module/thread_list.py14
3 files changed, 11 insertions, 11 deletions
diff --git a/module/Py_Load_File.py b/module/Py_Load_File.py
index 570e605cd..278b8f6c7 100644
--- a/module/Py_Load_File.py
+++ b/module/Py_Load_File.py
@@ -30,8 +30,8 @@ class PyLoadFile:
def init_download(self):
- if self.parent.config['useproxy']:
- self.plugin.req.add_proxy(self.parent.config['proxyprotocol'], self.parent.config['proxyadress'])
+ if self.parent.config['proxy']['activated']:
+ self.plugin.req.add_proxy(self.parent.config['proxy']['protocol'], self.parent.config['proxy']['adress'])
#@todo: check dependicies, ocr etc
diff --git a/module/file_list.py b/module/file_list.py
index a83ab61a5..35bec757f 100644
--- a/module/file_list.py
+++ b/module/file_list.py
@@ -37,7 +37,7 @@ class File_List(object):
def new_pyfile(self, url):
url = url.replace("\n", "")
pyfile = PyLoadFile(self.core, url)
- pyfile.download_folder = self.core.config['download_folder']
+ pyfile.download_folder = self.core.config['general']['download_folder']
pyfile.id = self.get_id()
return pyfile
@@ -56,7 +56,7 @@ class File_List(object):
self.append(url)
def remove(self, pyfile):
- if not self.core.config['debug_mode']:
+ if not self.core.config['general']['debug_mode']:
if pyfile in self.files:
self.files.remove(pyfile)
diff --git a/module/thread_list.py b/module/thread_list.py
index 778e2587d..d4f2dac97 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -32,7 +32,7 @@ class Thread_List(object):
self.parent = parent
self.list = parent.file_list #file list
self.threads = []
- self.max_threads = int(self.parent.config['max_downloads'])
+ self.max_threads = int(self.parent.config['general']['max_downloads'])
self.lock = RLock()
self.py_downloading = [] # files downloading
self.occ_plugins = [] #occupied plugins
@@ -113,7 +113,7 @@ class Thread_List(object):
elif pyfile.status.type == "failed":
self.parent.logger.warning("Download failed: " + pyfile.url+ " | " + pyfile.status.error)
- with open(self.parent.config['failed_file'], 'a') as f:
+ with open(self.parent.config['general']['failed_file'], 'a') as f:
f.write(pyfile.url + "\n")
self.list.remove(pyfile)
@@ -128,12 +128,12 @@ class Thread_List(object):
def init_reconnect(self):
"""initialise a reonnect"""
- if not self.parent.config['use_reconnect'] or self.reconnecting or not self.parent.is_reconnect_time():
+ if not self.parent.config['general']['use_reconnect'] or self.reconnecting or not self.parent.is_reconnect_time():
return False
- if not exists(self.parent.config['reconnect_method']):
- self.parent.logger.info(self.parent.config['reconnect_method'] + " not found")
- self.parent.config['use_reconnect'] = False
+ if not exists(self.parent.config['general']['reconnect_method']):
+ self.parent.logger.info(self.parent.config['general']['reconnect_method'] + " not found")
+ self.parent.config['general']['use_reconnect'] = False
return False
self.lock.acquire()
@@ -167,7 +167,7 @@ class Thread_List(object):
return False
def reconnect(self):
- reconn = subprocess.Popen(self.parent.config['reconnect_method'])
+ reconn = subprocess.Popen(self.parent.config['general']['reconnect_method'])
reconn.wait()
time.sleep(1)
ip = ""