summaryrefslogtreecommitdiffstats
path: root/module/download_thread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-01 19:55:47 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-01 19:55:47 +0200
commit9ff7fe5187f9b481847019ac3a30fe29ba4359ff (patch)
tree24d735ca92e49c4f7b0f7e5c20647f68533e1f09 /module/download_thread.py
parentmyvideo.de download plugin added (diff)
downloadpyload-9ff7fe5187f9b481847019ac3a30fe29ba4359ff.tar.xz
reconnect, not working, dont try it out
Diffstat (limited to 'module/download_thread.py')
-rw-r--r--module/download_thread.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/module/download_thread.py b/module/download_thread.py
index f8786c810..cced6508a 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -34,9 +34,9 @@ class Status(object):
self.expected_time = 0
self.filename = None
self.url = None
- self.exists = None
+ self.exists = False
self.waituntil = None
- self.want_reconnect = None
+ self.want_reconnect = False
# def __call__(self, blocks_read, block_size, total_size):
# if self.status_queue == None:
@@ -99,15 +99,19 @@ class Download_Thread(threading.Thread):
raise "FileDontExists" #i know its deprecated, who cares^^
if status.want_reconnect:
- print "handle reconnect"
+ reconnect = self.parent.init_reconnect(pyfile)
+ if reconnect:
+ status.type = "reconnected"
+ return False
while (time() < status.waituntil):
- if status.want_reconnect and self.reconnected:
- status = "reconnected"
+ if status.want_reconnect and self.parent.reconnecting:
+ status.type = "reconnected"
return False
status.type = "waiting"
- sleep(1) #eventuell auf genaue zeit warten
-
+ sleep(1)
+
+ status.want_reconnect = False
try:
status.type = "downloading"