summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/Go4UpCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/Go4UpCom.py')
-rwxr-xr-xmodule/plugins/crypter/Go4UpCom.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py
index 9a3315399..33bde9889 100755
--- a/module/plugins/crypter/Go4UpCom.py
+++ b/module/plugins/crypter/Go4UpCom.py
@@ -3,22 +3,21 @@
import re
import urlparse
-from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-from module.plugins.internal.utils import json
+from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.misc import json
class Go4UpCom(SimpleCrypter):
__name__ = "Go4UpCom"
__type__ = "crypter"
- __version__ = "0.16"
+ __version__ = "0.17"
__status__ = "testing"
__pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)'
- __config__ = [("activated" , "bool", "Activated" , True),
- ("use_premium" , "bool", "Use premium account if available" , True),
- ("use_subfolder" , "bool", "Save package to subfolder" , True),
- ("subfolder_per_package", "bool", "Create a subfolder for each package" , True),
- ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )]
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("use_premium" , "bool" , "Use premium account if available" , True ),
+ ("folder_per_package", "Default;Yes;No", "Create folder for each package" , "Default"),
+ ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )]
__description__ = """Go4Up.com decrypter plugin"""
__license__ = "GPLv3"
@@ -35,13 +34,13 @@ class Go4UpCom(SimpleCrypter):
def get_links(self):
links = []
- preference = self.get_config("preferred_hoster")
+ preference = self.config.get("preferred_hoster")
hosterslink_re = re.search(r'(/download/gethosts/.+?)"', self.data)
if hosterslink_re:
hosters = self.load(urlparse.urljoin("http://go4up.com/", hosterslink_re.group(1)))
for hoster in json.loads(hosters):
- if preference != 0 and preference != int(hoster["hostId"]):
+ if preference is not 0 and preference != int(hoster["hostId"]):
continue
pagelink_re = re.search(self.LINK_PATTERN, hoster["link"])
if pagelink_re:
@@ -51,6 +50,3 @@ class Go4UpCom(SimpleCrypter):
links.append(link_re.group(1))
return links
-
-
-getInfo = create_getInfo(Go4UpCom)