summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2010-01-03 21:12:02 +0100
committerGravatar spoob <spoob@gmx.de> 2010-01-03 21:12:02 +0100
commite9dc8ea08452c1555e28f4ac1970b96315ec4376 (patch)
tree129279f4fc2f95e8a37543fca1c73a1aea726df1 /module
parentSecuredIn plugin (diff)
downloadpyload-e9dc8ea08452c1555e28f4ac1970b96315ec4376.tar.xz
Cleaned Reconnect XML Config
Diffstat (limited to 'module')
-rw-r--r--module/config/core_default.xml10
-rw-r--r--module/plugins/__init__.py1
-rw-r--r--module/plugins/hoster/NetloadIn.py3
-rw-r--r--module/thread_list.py10
4 files changed, 11 insertions, 13 deletions
diff --git a/module/config/core_default.xml b/module/config/core_default.xml
index 4c95d5386..035b676f0 100644
--- a/module/config/core_default.xml
+++ b/module/config/core_default.xml
@@ -31,10 +31,8 @@
<language type="str" input="en;de;fr" name="Language">de</language>
<download_folder type="str" name="Download Folder">Downloads</download_folder>
<max_downloads type="int" name="Max Parallel Downloads">3</max_downloads>
- <use_reconnect type="bool" name="Use Reconnect">False</use_reconnect>
<link_file type="str" name="File For Links">links.txt</link_file>
<failed_file type="str" name="File For Failed Links">failed_links.txt</failed_file>
- <reconnect_method type="str" name="Reconnect Method">None</reconnect_method>
<debug_mode type="bool" name="Debug Mode">False</debug_mode>
<max_download_time type="int" name="Max Download Time">5</max_download_time>
<download_speed_limit type="int" name="Download Speed Limit">0</download_speed_limit>
@@ -44,9 +42,11 @@
<search_updates type="bool" name="Search">True</search_updates>
<install_updates type="bool" name="Install">False</install_updates>
</updates>
- <reconnectTime name="Reconnect Time">
- <start type="time" name="Start">0:00</start>
- <end type="time" name="End">0:00</end>
+ <reconnect name="Reconnect">
+ <activated type="bool" name="Use Reconnect">False</activated>
+ <method type="str" name="Method">None</method>
+ <startTime type="time" name="Start">0:00</startTime>
+ <endTime type="time" name="End">0:00</endTime>
</reconnectTime>
<downloadTime name="Download Time">
<start type="time" name="Start">0:00</start>
diff --git a/module/plugins/__init__.py b/module/plugins/__init__.py
index e69de29bb..8b1378917 100644
--- a/module/plugins/__init__.py
+++ b/module/plugins/__init__.py
@@ -0,0 +1 @@
+
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 1f7e7d011..0e5245e9e 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -40,7 +40,6 @@ class NetloadIn(Plugin):
self.req.clear_cookies()
self.want_reconnect = False
-
self.download_api_data()
if self.file_exists():
pyfile.status.filename = self.get_file_name()
@@ -49,7 +48,6 @@ class NetloadIn(Plugin):
self.req.load("http://netload.in/index.php", None, { "txtuser" : self.config['username'], "txtpass" : self.config['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True)
self.logger.info("Netload: Use Premium Account")
pyfile.status.url = self.parent.url
- #@TODO: premium??
return True
self.download_html()
@@ -73,7 +71,6 @@ class NetloadIn(Plugin):
src = self.req.load(apiurl, cookies=False, get={"file_id": match.group(1)})
self.api_data = {}
if not src == "unknown file_data":
- print "apidata:", src
lines = src.split(";")
self.api_data["exists"] = True
self.api_data["fileid"] = lines[0]
diff --git a/module/thread_list.py b/module/thread_list.py
index d3eb4d203..5d0bcf53a 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -160,12 +160,12 @@ class Thread_List(object):
def init_reconnect(self):
"""initialise a reonnect"""
- if not self.parent.config['general']['use_reconnect'] or self.reconnecting or not self.parent.server_methods.is_time_reconnect():
+ if not self.parent.config['reconnect']['activated'] or self.reconnecting or not self.parent.server_methods.is_time_reconnect():
return 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
+ if not exists(self.parent.config['reconnect']['method']):
+ self.parent.logger.info(self.parent.config['reconnect']['method'] + " not found")
+ self.parent.config['reconnect']['activated'] = False
return False
self.lock.acquire()
@@ -200,7 +200,7 @@ class Thread_List(object):
def reconnect(self):
self.parent.logger.info("Start reconnect")
- reconn = subprocess.Popen(self.parent.config['general']['reconnect_method'])#, stdout=subprocess.PIPE)
+ reconn = subprocess.Popen(self.parent.config['activated']['method'])#, stdout=subprocess.PIPE)
reconn.wait()
time.sleep(1)
ip = ""