diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-08 23:25:48 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-08 23:25:48 +0200 |
commit | 3e9ac24baa2131f77c5f3756ee1defc0178a4e5c (patch) | |
tree | 7064e508e60079dfb3bbb60da83343ec38e061dd /module | |
parent | erniebs x7 fix (diff) | |
download | pyload-3e9ac24baa2131f77c5f3756ee1defc0178a4e5c.tar.xz |
retries for real debrid
Diffstat (limited to 'module')
-rw-r--r-- | module/common/JsEngine.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/RealdebridCom.py | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/module/common/JsEngine.py b/module/common/JsEngine.py index 0b451c9dd..5612b12a3 100644 --- a/module/common/JsEngine.py +++ b/module/common/JsEngine.py @@ -49,7 +49,7 @@ if not ENGINE: pass -if not ENGINE or ENGINE: +if not ENGINE: try: path = "" #path where to find rhino 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.")
|