summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-22 16:38:05 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-22 16:38:05 +0200
commit872412242c1a6e7217649d9606e9207893513434 (patch)
treecb6516fb9874f175387aadd1e417259f9502c05a
parentremove queue from thread list and implemented own method to get suited (diff)
downloadpyload-872412242c1a6e7217649d9606e9207893513434.tar.xz
fixed little bugs
-rw-r--r--Core.py6
-rw-r--r--Plugins/RapidshareCom.py5
-rw-r--r--module/download_thread.py28
-rw-r--r--module/thread_list.py4
4 files changed, 21 insertions, 22 deletions
diff --git a/Core.py b/Core.py
index 8eba8ad88..8c5b702a3 100644
--- a/Core.py
+++ b/Core.py
@@ -227,8 +227,8 @@ class Core(object):
for pyfile in self.thread_list.py_downloading:
if pyfile.status.type == 'downloading':
- print "Speed" ,pyfile.status.get_speed()
- print "ETA" , pyfile.status.get_ETA()
+ print pyfile.status.filename, "Speed" ,pyfile.status.get_speed() ,"kb/s"
+ print pyfile.status.filename, "ETA" , pyfile.status.get_ETA(), "s"
#try:
# fn = pyfile.status.filename
@@ -241,7 +241,7 @@ class Core(object):
# print pyfile.status.filename, "downloading"
if pyfile.status.type == 'waiting':
- print pyfile.status.filename + ": " + "wartet", pyfile.status.waituntil -time()
+ print pyfile.status.filename + ": " + "wartet", pyfile.status.waituntil -time() , "s"
def start(self):
""" starts the machine
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index 8adf89e25..6ad0b43e8 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -90,8 +90,9 @@ class RapidshareCom(Plugin):
if re.search(r".*The File could not be found.*", self.html[0]) != None or \
re.search(r"(<p>This limit is reached.</p>)", self.html[0]) or \
re.search(r"(.*is momentarily not available.*)", self.html[0]) or \
- re.search(r"(.*The uploader has removed this file from the server.*)", self.html[0]):
- return False
+ re.search(r"(.*The uploader has removed this file from the server.*)", self.html[0]) or \
+ re.search(r"(.*This file is suspected to contain illegal content.*)", self.html[0]):
+ return False
else:
return True
diff --git a/module/download_thread.py b/module/download_thread.py
index e8dbf64c0..7b6b0fe6d 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -94,26 +94,24 @@ class Download_Thread(threading.Thread):
status = pyfile.status
pyfile.prepareDownload()
- if not status.exists:
- return False
+ if status.exists:
- if status.want_reconnect:
- print "handle reconnect"
- return False
+ if status.want_reconnect:
+ print "handle reconnect"
- while (time() < status.waituntil):
- status.type = "waiting"
- sleep(1) #eventuell auf genaue zeit warten
+ while (time() < status.waituntil):
+ status.type = "waiting"
+ sleep(1) #eventuell auf genaue zeit warten
- status.type = "downloading"
- print status.url , status.filename
+ status.type = "downloading"
+ print status.url , status.filename
- try:
- pyfile.plugin.req.download(status.url, pyfile.download_folder + "/" + status.filename)
- status.type = "finished"
- except:
- status.type = "failed"
+ try:
+ pyfile.plugin.req.download(status.url, pyfile.download_folder + "/" + status.filename)
+ status.type = "finished"
+ except:
+ status.type = "failed"
self.parent.job_finished(pyfile)
diff --git a/module/thread_list.py b/module/thread_list.py
index 5f1710368..34fa05599 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -65,7 +65,7 @@ class Thread_List(object):
pyfile = None
- for i in range(0,len(self.py_load_files)):
+ for i in range(len(self.py_load_files)):
if not self.py_load_files[i].modul.__name__ in self.occ_plugins:
pyfile = self.py_load_files.pop(i)
@@ -76,7 +76,7 @@ class Thread_List(object):
self.lock.release()
return pyfile
- def job_finish(self, pyfile):
+ def job_finished(self, pyfile):
self.lock.acquire()
self.occ_plugins.remove(pyfile.modul.__name__)