summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-08 23:25:48 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-08 23:25:48 +0200
commit3e9ac24baa2131f77c5f3756ee1defc0178a4e5c (patch)
tree7064e508e60079dfb3bbb60da83343ec38e061dd /module/plugins
parenterniebs x7 fix (diff)
downloadpyload-3e9ac24baa2131f77c5f3756ee1defc0178a4e5c.tar.xz
retries for real debrid
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/RealdebridCom.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index 47bd5e4db..d003b4e2b 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -4,6 +4,7 @@
import re
from urllib import quote, unquote
from random import randrange
+from time import sleep
from module.plugins.Hoster import Hoster
@@ -26,6 +27,9 @@ class RealdebridCom(Hoster):
name += "%s.tmp" % randrange(100,999)
return name
+ def init(self):
+ self.tries = 0
+
def setup(self):
self.chunkLimit = 3
self.resumeDownload = True
@@ -76,5 +80,11 @@ class RealdebridCom(Hoster):
{"error": "<html><head><title>An error occured while processing your request</title>"})
if check == "error":
- self.fail("Error occured.")
+ #usual this download can safely be retried
+ if self.tries < 3:
+ self.tries += 1
+ sleep(1)
+ self.retry()
+ else:
+ self.fail("Error occured.")