From 5f461121485ac69997565c3d35a26f4abbe388ae Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 25 Mar 2013 21:30:23 +0100 Subject: DebridItaliaCom: retry if the downloaded file is empty --- module/plugins/hoster/DebridItaliaCom.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/DebridItaliaCom.py') diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 5142bbdf7..a8f7dd57e 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -7,7 +7,7 @@ from module.plugins.Hoster import Hoster class DebridItaliaCom(Hoster): __name__ = "DebridItaliaCom" - __version__ = "0.01" + __version__ = "0.02" __type__ = "hoster" __pattern__ = r"https?://.*debriditalia\.com" __description__ = """Debriditalia.com hoster plugin""" @@ -35,4 +35,9 @@ class DebridItaliaCom(Hoster): self.logDebug("New URL: %s" % new_url) - self.download(new_url, disposition=True) \ No newline at end of file + self.download(new_url, disposition=True) + + check = self.checkDownload({"empty": re.compile(r"^$")}) + + if check == "empty": + self.retry(5, 120, 'Empty file downloaded') -- cgit v1.2.3