From 0d0a4db8cae03fb96860e4d7ba374ed4c83ceabc Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 16:47:20 +0200 Subject: UnrestrictLi: set offline status from API --- module/plugins/hoster/UnrestrictLi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UnrestrictLi.py') diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 084c2beff..24ba6b574 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.04" + __version__ = "0.05" __type__ = "hoster" __pattern__ = r"https?://.*(unrestrict|unr)\.li" __description__ = """Unrestrict.li hoster plugin""" @@ -61,7 +61,9 @@ class UnrestrictLi(Hoster): self.logDebug("JSON data: " + page) if page != '': break - if "You are not allowed to download from this host" in page: + if "File offline" in page: + self.offline() + elif "You are not allowed to download from this host" in page: self.fail("You are not allowed to download from this host") 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") -- cgit v1.2.3 From 560bbc5a8a243265acf4301d50e5b7db7bbd7afa Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 21:47:30 +0200 Subject: Using the same translatable string --- module/plugins/hoster/UnrestrictLi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UnrestrictLi.py') diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 24ba6b574..397390691 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.05" + __version__ = "0.06" __type__ = "hoster" __pattern__ = r"https?://.*(unrestrict|unr)\.li" __description__ = """Unrestrict.li hoster plugin""" @@ -48,7 +48,7 @@ class UnrestrictLi(Hoster): def process(self, pyfile): if not self.account: - self.logError("Please enter your Unrestrict.li account or deactivate this plugin") + self.logError(_("Please enter your %s account or deactivate this plugin") % "Unrestrict.li") self.fail("No Unrestrict.li account provided") self.logDebug("Old URL: %s" % pyfile.url) -- cgit v1.2.3