diff options
-rw-r--r-- | module/PluginThread.py | 4 | ||||
-rw-r--r-- | module/gui/Queue.py | 15 | ||||
-rw-r--r-- | module/lib/SecureXMLRPCServer.py | 2 |
3 files changed, 11 insertions, 10 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index 34cf46bc5..b99589154 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -32,7 +32,7 @@ from os.path import exists from pycurl import error from utils import save_join -from module import PyFile +from module.PyFile import PyFile from module.plugins.Plugin import Abort from module.plugins.Plugin import Fail from module.plugins.Plugin import Reconnect @@ -400,7 +400,7 @@ class HookThread(PluginThread): self.active = pyfile m.localThreads.append(self) - + if isinstance(pyfile, PyFile): pyfile.setStatus("processing") diff --git a/module/gui/Queue.py b/module/gui/Queue.py index 4e8bcc04b..c1944eb54 100644 --- a/module/gui/Queue.py +++ b/module/gui/Queue.py @@ -147,8 +147,9 @@ class QueueModel(CollectorModel): return perc, rest return None - def getProgress(self, item): - locker = QMutexLocker(self.mutex) + def getProgress(self, item, locked=True): + if locked: + locker = QMutexLocker(self.mutex) if isinstance(item, Link): try: return int(item.data["progress"]) @@ -229,9 +230,9 @@ class QueueModel(CollectorModel): elif index.column() == 4: item = index.internalPointer() if isinstance(item, Link): - if self.getProgress(item) == 100: + if self.getProgress(item, False) == 100: return QVariant(formatSize(item.data["size"])) - elif self.getProgress(item) == 0: + elif self.getProgress(item, False) == 0: return QVariant("0 B / %s" % formatSize(item.data["size"])) else: try: @@ -247,8 +248,8 @@ class QueueModel(CollectorModel): except: s = c.data["size"] if c.data["downloading"]: - cs += s - item.data["downloading"]["bleft"] - elif self.getProgress(c) == 100: + cs += s - c.data["downloading"]["bleft"] + elif self.getProgress(c, False) == 100: cs += s ms += s if cs == 0 or cs == ms: @@ -277,7 +278,7 @@ class QueueView(CollectorView): self.setColumnWidth(0, 300) self.setColumnWidth(1, 100) - self.setColumnWidth(2, 100) + self.setColumnWidth(2, 120) self.setColumnWidth(3, 50) self.setColumnWidth(4, 100) self.setColumnWidth(5, 70) diff --git a/module/lib/SecureXMLRPCServer.py b/module/lib/SecureXMLRPCServer.py index 525ffbe82..33b91a187 100644 --- a/module/lib/SecureXMLRPCServer.py +++ b/module/lib/SecureXMLRPCServer.py @@ -90,7 +90,7 @@ class AuthXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): class SecureXMLRPCRequestHandler(AuthXMLRPCRequestHandler): def __init__(self, request, client_address, server, client_digest=None): - self.authMap = server.getAuthenticationMap() + self.checkAuth = server.checkAuth SimpleXMLRPCRequestHandler.__init__(self, request, client_address, server) self.client_digest = client_digest |