diff options
Diffstat (limited to 'pyload/plugin/hoster/AlldebridCom.py')
-rw-r--r-- | pyload/plugin/hoster/AlldebridCom.py | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/pyload/plugin/hoster/AlldebridCom.py b/pyload/plugin/hoster/AlldebridCom.py index 8ab98bc6f..d739600d9 100644 --- a/pyload/plugin/hoster/AlldebridCom.py +++ b/pyload/plugin/hoster/AlldebridCom.py @@ -13,27 +13,16 @@ from pyload.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.44" + __version__ = "0.46" __pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Alldebrid.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("Andy Voigt", "spamsales@online.de")] - def getFilename(self, url): - try: - name = unquote(url.rsplit("/", 1)[1]) - except IndexError: - name = "Unknown_Filename..." - - if name.endswith("..."): # incomplete filename, append random stuff - name += "%s.tmp" % randrange(100, 999) - - return name - - def setup(self): self.chunkLimit = 16 @@ -58,18 +47,9 @@ class AlldebridCom(MultiHoster): pyfile.size = parseFileSize(data['filesize']) self.link = data['link'] - if self.getConfig("ssl"): + if self.getConfig('ssl'): self.link = self.link.replace("http://", "https://") else: self.link = self.link.replace("https://", "http://") - if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"): - #only use when name wasnt already set - pyfile.name = self.getFilename(self.link) - - - def checkFile(self): - if self.checkDownload({'error': "<title>An error occured while processing your request</title>"}) == "error": - self.retry(wait_time=60, reason=_("An error occured while generating link")) - return super(AlldebridCom, self).checkFile() |