summaryrefslogtreecommitdiffstats
path: root/module/download_thread.py
diff options
context:
space:
mode:
authorGravatar cp1 <christopherpool1@googlemail.com> 2009-06-11 16:50:48 +0200
committerGravatar cp1 <christopherpool1@googlemail.com> 2009-06-11 16:50:48 +0200
commitfd6e286ee089cf75276f2581471aba254d69fcb5 (patch)
tree1f91e2063f3182d172d7c7f70c4fdb98b407a60b /module/download_thread.py
parentadd wxversion selector to ensure wxWidgets 2.8 is used (diff)
downloadpyload-fd6e286ee089cf75276f2581471aba254d69fcb5.tar.xz
correcting false identation (tabs to spaces)
Diffstat (limited to 'module/download_thread.py')
-rw-r--r--module/download_thread.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/module/download_thread.py b/module/download_thread.py
index 5313a7d34..3ad2ba85d 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-# -*- coding: utf-8 -*-
-#
+# -*- coding: utf-8 -*-
+#
#Copyright (C) 2009 sp00b, sebnapi
#
#This program is free software; you can redistribute it and/or modify
@@ -34,15 +34,15 @@ class Status(object):
self.exists = False
self.waituntil = None
self.want_reconnect = False
-
+
def get_ETA(self):
return self.pyfile.plugin.req.get_ETA()
def get_speed(self):
return self.pyfile.plugin.req.get_speed()
def kB_left(self):
return self.pyfile.plugins.req.kB_left()
-
-
+
+
class Download_Thread(threading.Thread):
def __init__(self, parent):
threading.Thread.__init__(self)
@@ -50,9 +50,9 @@ class Download_Thread(threading.Thread):
self.parent = parent
self.setDaemon(True)
self.loadedPyFile = None
-
+
self.start()
-
+
def run(self):
while (not self.shutdown):
if self.parent.py_load_files:
@@ -76,24 +76,24 @@ class Download_Thread(threading.Thread):
if not status.exists:
raise "FileDontExists" #i know its deprecated, who cares^^
-
- status.type = "waiting"
+
+ status.type = "waiting"
while (time() < status.waituntil):
if self.parent.init_reconnect() or self.parent.reconnecting:
status.type = "reconnected"
- status.want_reconnect = False
+ status.want_reconnect = False
return False
sleep(1)
status.want_reconnect = False
-
+
status.type = "downloading"
-
+
pyfile.plugin.proceed(status.url, pyfile.download_folder + "/" + status.filename)
status.type = "finished"
#startet downloader
- #urllib.urlretrieve(status.url, pyfile.download_folder + "/" + status.filename, status)
- #self.shutdown = True
+ #urllib.urlretrieve(status.url, pyfile.download_folder + "/" + status.filename, status)
+ #self.shutdown = True \ No newline at end of file