diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-12 13:28:03 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-12 13:28:03 +0200 |
commit | ba681d56690fb9813adc15aa7f1b4bdf503ccd22 (patch) | |
tree | d86071a033ae5294401f2bc888a108fe5b06e49a /module | |
parent | several fixes (diff) | |
download | pyload-ba681d56690fb9813adc15aa7f1b4bdf503ccd22.tar.xz |
some fixes
Diffstat (limited to 'module')
-rw-r--r-- | module/PluginThread.py | 1 | ||||
-rw-r--r-- | module/ThreadManager.py | 2 | ||||
-rw-r--r-- | module/pyunrar.py | 14 |
3 files changed, 15 insertions, 2 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index ed289a591..d3801788e 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -230,6 +230,7 @@ class DownloadThread(PluginThread): self.active = False pyfile.release() else: + pyfile.plugin.req.canContinue = False self.queue.put(pyfile) continue diff --git a/module/ThreadManager.py b/module/ThreadManager.py index d6bf155a5..deeeb15c0 100644 --- a/module/ThreadManager.py +++ b/module/ThreadManager.py @@ -92,6 +92,8 @@ class ThreadManager: self.tryReconnect() except Exception, e: self.log.error(_("Reconnect Failed: %s") % str(e) ) + if self.core.debug: + print_exc() self.checkThreadCount() self.assignJob() diff --git a/module/pyunrar.py b/module/pyunrar.py index 7085e6c09..0cb6d6d2e 100644 --- a/module/pyunrar.py +++ b/module/pyunrar.py @@ -291,9 +291,9 @@ class Unrar(): if self.ram: size = self.biggestFiles["size"] / 1024 ** 2 - if self.ram < 127 and size > 50: + if self.ram < 127 and size > 100: raise LowRamError - elif self.ram < 256 and size > 500: + elif self.ram < 256 and size > 300: raise LowRamError elif self.ram < 512 and size > 2000: raise LowRamError @@ -335,6 +335,16 @@ class Unrar(): finally: rmtree(tdir) try: + + if self.ram: + size = self.biggestFiles["size"] / 1024 ** 2 + if self.ram < 127 and size > 150: + raise LowRamError + elif self.ram < 256 and size > 500: + raise LowRamError + elif self.ram < 512 and size > 2000: + raise LowRamError + self.extract(password=correctPassword, fullPath=fullPath, destination=destination, overwrite=overwrite, statusFunction=statusFunction, exclude=exclude) self.password = correctPassword return True |