diff options
| -rw-r--r-- | module/plugins/hooks/UnrestrictLi.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/UnrestrictLi.py | 9 | 
2 files changed, 10 insertions, 4 deletions
| diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 793e63e8f..0810a22d5 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -22,13 +22,14 @@ from module.common.json_layer import json_loads  class UnrestrictLi(MultiHoster):      __name__ = "UnrestrictLi" -    __version__ = "0.01" +    __version__ = "0.02"      __type__ = "hook"      __config__ = [("activated", "bool", "Activated", "False"),                    ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),                    ("hosterList", "str", "Hoster list (comma separated)", ""),                    ("unloadFailing", "bool", "Revert to standard download if download fails", "False"), -                  ("interval", "int", "Reload interval in hours (0 to disable)", "24")] +                  ("interval", "int", "Reload interval in hours (0 to disable)", "24"), +                  ("history", "bool", "Delete History", "False")]      __description__ = """Unrestrict.li hook plugin"""      __author_name__ = ("stickell") diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 1652dc606..e866a9269 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.02" +    __version__ = "0.03"      __type__ = "hoster"      __pattern__ = r"https?://.*(unrestrict|unr)\.li"      __description__ = """Unrestrict.li hoster plugin""" @@ -56,7 +56,8 @@ class UnrestrictLi(Hoster):              new_url = pyfile.url          else:              for i in xrange(5): -                page = self.req.load('https://unrestrict.li/unrestrict.php', post={'link': pyfile.url, 'domain': 'long'}) +                page = self.req.load('https://unrestrict.li/unrestrict.php', +                                     post={'link': pyfile.url, 'domain': 'long'})                  self.logDebug("JSON data: " + page)                  if page != '':                      break @@ -72,3 +73,7 @@ class UnrestrictLi(Hoster):          self.logDebug("New URL: " + new_url)          self.download(new_url, disposition=True) + +        if self.getConfig("history"): +            self.load("https://unrestrict.li/history/&delete=all") +            self.logInfo("Download history deleted") | 
