From 95f86060e833b444542ebadede42ac06cc93749a Mon Sep 17 00:00:00 2001
From: Stefano <l.stickell@yahoo.it>
Date: Wed, 19 Jun 2013 13:52:02 +0200
Subject: UnrestrictLi: get API data for size/checksum

---
 module/plugins/hoster/UnrestrictLi.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'module')

diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index 273a300a0..1652dc606 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.01"
+    __version__ = "0.02"
     __type__ = "hoster"
     __pattern__ = r"https?://.*(unrestrict|unr)\.li"
     __description__ = """Unrestrict.li hoster plugin"""
@@ -65,7 +65,9 @@ class UnrestrictLi(Hoster):
             elif "You have reached your daily limit for this host" in page:
                 self.logInfo("Reached daily limit for this host. Waiting until 00:10 GMT+2")
                 self.retry(5, secondsToMidnight(), "Daily limit for this host reached")
-            new_url = json_loads(page).keys()[0]
+            page = json_loads(page)
+            new_url = page.keys()[0]
+            self.api_data = page[new_url]
 
         self.logDebug("New URL: " + new_url)
 
-- 
cgit v1.2.3