diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-08-18 20:47:50 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-08-18 20:47:50 +0200 |
commit | 876e2de602f22ace3a2fa9a2d56f48e3e807cd6a (patch) | |
tree | 1593de5edfdce1ef5e1c8a9162efcc89b3c48cbe /pyload | |
parent | fixed online status fetching (diff) | |
download | pyload-876e2de602f22ace3a2fa9a2d56f48e3e807cd6a.tar.xz |
small fixes for crypter
Diffstat (limited to 'pyload')
-rw-r--r-- | pyload/api/DownloadPreparingApi.py | 2 | ||||
-rw-r--r-- | pyload/plugins/Crypter.py | 4 | ||||
-rw-r--r-- | pyload/remote/wsbackend/AsyncHandler.py | 6 | ||||
-rw-r--r-- | pyload/threads/InfoThread.py | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/pyload/api/DownloadPreparingApi.py b/pyload/api/DownloadPreparingApi.py index d74f0aee2..68c83e97d 100644 --- a/pyload/api/DownloadPreparingApi.py +++ b/pyload/api/DownloadPreparingApi.py @@ -42,6 +42,7 @@ class DownloadPreparingApi(ApiComponent): """ hoster, crypter = self.core.pluginManager.parseUrls(links) + #: TODO: withhold crypter, derypt or add later # initial result does not contain the crypter links tmp = [(url, LinkStatus(url, url, pluginname, -1, DS.Queued)) for url, pluginname in hoster + crypter] data = parseNames(tmp) @@ -77,7 +78,6 @@ class DownloadPreparingApi(ApiComponent): page = getURL(url) urls += [x[0] for x in urlmatcher.findall(page)] - # remove duplicates return self.checkLinks(uniqify(urls)) @RequirePerm(Permission.Add) diff --git a/pyload/plugins/Crypter.py b/pyload/plugins/Crypter.py index d780ad805..2f5584074 100644 --- a/pyload/plugins/Crypter.py +++ b/pyload/plugins/Crypter.py @@ -86,6 +86,10 @@ class Crypter(Base): #: Optional name of an account plugin that should be used, but does not guarantee that one is available USE_ACCOUNT = None + #: When True this crypter will not be decrypted directly and queued one by one. + # Needed for crypter that can't run in parallel or need to wait between decryption. + QUEUE_DECRYPT = False + @classmethod def decrypt(cls, core, url_or_urls): """Static method to decrypt urls or content. Can be used by other plugins. diff --git a/pyload/remote/wsbackend/AsyncHandler.py b/pyload/remote/wsbackend/AsyncHandler.py index 527834b7c..136cc060d 100644 --- a/pyload/remote/wsbackend/AsyncHandler.py +++ b/pyload/remote/wsbackend/AsyncHandler.py @@ -68,11 +68,13 @@ class AsyncHandler(AbstractHandler): def on_close(self, req): try: del req.queue + except AttributeError: # connection could be uninitialized + pass + + try: self.clients.remove(req) except ValueError: # ignore when not in list pass - except AttributeError: # connection could be uninitialized - pass @lock def add_event(self, event, *args, **kwargs): diff --git a/pyload/threads/InfoThread.py b/pyload/threads/InfoThread.py index ff77117c9..f3aad5bb6 100644 --- a/pyload/threads/InfoThread.py +++ b/pyload/threads/InfoThread.py @@ -51,7 +51,7 @@ class InfoThread(BaseThread): self.m.core.files.save() else: #post the results - for name, urls in crypter: + for name, urls in crypter.iteritems(): #attach container content try: data = self.decrypt(name, urls) |