From 0d6b13201eab010ba0c0b07274cf8cd9f6694b7b Mon Sep 17 00:00:00 2001 From: Arno-Nymous Date: Thu, 21 Jan 2016 14:07:04 +0100 Subject: Few plugin changes [ShareLinksBiz] Speed up link parsing by cascading through all available container types. [Captcha.py] Change string formatting to `.format()` here as well. Also fixes an `TypeError` occuring on line 106. --- module/plugins/crypter/ShareLinksBiz.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index fd9eb4124..a081d750e 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -53,9 +53,15 @@ class ShareLinksBiz(Crypter): #: Extract package links pack_links = [] - pack_links.extend(self.handle_web_links()) - pack_links.extend(self.handle_containers()) - pack_links.extend(self.handle_CNL2()) + for source in ['cnl', 'web', 'dlc']: + if source == 'cnl': + pack_links.extend(self.handle_CNL2()) + if source == 'web': + pack_links.extend(self.handle_web_links()) + if source == 'dlc': + pack_links.extend(self.handle_containers()) + if pack_links: + break pack_links = set(pack_links) #: Get package info -- cgit v1.2.3