summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/RealdebridCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster/RealdebridCom.py')
-rw-r--r--pyload/plugins/hoster/RealdebridCom.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pyload/plugins/hoster/RealdebridCom.py b/pyload/plugins/hoster/RealdebridCom.py
index 09c8d7f7e..f839dc613 100644
--- a/pyload/plugins/hoster/RealdebridCom.py
+++ b/pyload/plugins/hoster/RealdebridCom.py
@@ -12,14 +12,15 @@ from pyload.utils import parseFileSize
class RealdebridCom(Hoster):
- __name__ = "RealdebridCom"
- __type__ = "hoster"
+ __name__ = "RealdebridCom"
+ __type__ = "hoster"
__version__ = "0.53"
__pattern__ = r'https?://(?:[^/]*\.)?real-debrid\..*'
__description__ = """Real-Debrid.com hoster plugin"""
- __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")]
+ __license__ = "GPLv3"
+ __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")]
def getFilename(self, url):
@@ -27,20 +28,22 @@ class RealdebridCom(Hoster):
name = unquote(url.rsplit("/", 1)[1])
except IndexError:
name = "Unknown_Filename..."
- if not name or name.endswith(".."): # incomplete filename, append random stuff
+ if not name or name.endswith(".."): #: incomplete filename, append random stuff
name += "%s.tmp" % randrange(100, 999)
return name
+
def setup(self):
self.chunkLimit = 3
self.resumeDownload = True
+
def process(self, pyfile):
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
elif not self.account:
self.logError(_("Please enter your %s account or deactivate this plugin") % "Real-debrid")
- self.fail("No Real-debrid account provided")
+ self.fail(_("No Real-debrid account provided"))
else:
self.logDebug("Old URL: %s" % pyfile.url)
password = self.getPassword().splitlines()
@@ -87,4 +90,4 @@ class RealdebridCom(Hoster):
if check == "error":
#usual this download can safely be retried
- self.retry(wait_time=60, reason="An error occured while generating link.")
+ self.retry(wait_time=60, reason=_("An error occured while generating link"))