summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-08-05 17:14:05 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-08-05 17:14:05 +0200
commit216200e3dde7270570db8b5b89c62542ecc7d7fe (patch)
tree480fc606b78315e1275cd6845d269470abc40c9d /module/plugins/hoster
parentPutlockerCom: ability to resume downloads even for free downloads (diff)
downloadpyload-216200e3dde7270570db8b5b89c62542ecc7d7fe.tar.xz
UnrestrictLi: detect name and size from API data
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/UnrestrictLi.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index 397390691..8a6b9e2c4 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -35,7 +35,7 @@ def secondsToMidnight():
class UnrestrictLi(Hoster):
__name__ = "UnrestrictLi"
- __version__ = "0.06"
+ __version__ = "0.07"
__type__ = "hoster"
__pattern__ = r"https?://.*(unrestrict|unr)\.li"
__description__ = """Unrestrict.li hoster plugin"""
@@ -74,8 +74,16 @@ class UnrestrictLi(Hoster):
self.logDebug("New URL: " + new_url)
+ self.setNameSize()
+
self.download(new_url, disposition=True)
if self.getConfig("history"):
self.load("https://unrestrict.li/history/&delete=all")
self.logInfo("Download history deleted")
+
+ def setNameSize(self):
+ if 'name' in self.api_data:
+ self.pyfile.name = self.api_data['name']
+ if 'size' in self.api_data:
+ self.pyfile.size = self.api_data['size']