summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/LinksnappyCom.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hoster/LinksnappyCom.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/LinksnappyCom.py')
-rw-r--r--module/plugins/hoster/LinksnappyCom.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py
index 9c3af4ae3..1c3f86d4a 100644
--- a/module/plugins/hoster/LinksnappyCom.py
+++ b/module/plugins/hoster/LinksnappyCom.py
@@ -10,30 +10,29 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class LinksnappyCom(MultiHoster):
__name__ = "LinksnappyCom"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.11"
+ __status__ = "testing"
__pattern__ = r'https?://(?:[^/]+\.)?linksnappy\.com'
- __config__ = [("use_premium", "bool", "Use premium account if available", True)]
+ __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ ("revertfailed", "bool", "Revert to standard download if fails", True)]
__description__ = """Linksnappy.com multi-hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- SINGLE_CHUNK_HOSTERS = ["easybytez.com"]
-
-
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
host = self._get_host(pyfile.url)
json_params = json_dumps({'link' : pyfile.url,
'type' : host,
'username': self.user,
- 'password': self.account.getAccountData(self.user)['password']})
+ 'password': self.account.get_info(self.user)['login']['password']})
- r = self.load("http://gen.linksnappy.com/genAPI.php",
+ r = self.load("http://linksnappy.com/api/linkgen",
post={'genLinks': json_params})
- self.logDebug("JSON data: " + r)
+ self.log_debug("JSON data: " + r)
j = json_loads(r)['links'][0]
@@ -43,11 +42,6 @@ class LinksnappyCom(MultiHoster):
pyfile.name = j['filename']
self.link = j['generated']
- if host in self.SINGLE_CHUNK_HOSTERS:
- self.chunkLimit = 1
- else:
- self.setup()
-
@staticmethod
def _get_host(url):