diff options
| author | 2011-05-27 22:52:24 +0200 | |
|---|---|---|
| committer | 2011-05-27 22:52:24 +0200 | |
| commit | 3254a85595dd27a96862d8d7b932c03ade166f95 (patch) | |
| tree | 969bd75d09550da32792c2537e8d6e9f0101386e /module/plugins | |
| parent | fixes last commit (diff) | |
| download | pyload-3254a85595dd27a96862d8d7b932c03ade166f95.tar.xz | |
change password in webif
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/hoster/FilesonicCom.py | 11 | ||||
| -rw-r--r-- | module/plugins/hoster/RealdebridCom.py | 20 | 
2 files changed, 20 insertions, 11 deletions
| diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 8862c84e0..6aabcc277 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -62,8 +62,8 @@ class FilesonicCom(Hoster):      CAPTCHA_TYPE1_PATTERN = r'Recaptcha.create\("(.*?)",'
      CAPTCHA_TYPE2_PATTERN = r'id="recaptcha_image"><img style="display: block;" src="(.+)image?c=(.+?)"'
 -    def init(self): -        if self.account: +    def init(self):
 +        if self.account:
              self.premium = self.account.getAccountInfo(self.user)["premium"]
          if not self.premium:
              self.chunkLimit = 1
 @@ -94,8 +94,11 @@ class FilesonicCom(Hoster):                  self.offline()
              if item["is_password_protected"] != 0:
                  self.fail("This file is password protected")
 -            if item["is_premium_only"] != 0 and not self.premium:
 -                self.fail("need premium account for file")
 +
 +            # ignored this check due to false api information
 +            #if item["is_premium_only"] != 0 and not self.premium:
 +            #    self.fail("need premium account for file")
 +
              self.pyfile.name=item["filename"]
              # Fix the url and resolve the domain to the correct regional variation
 diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index d86259c4c..47bd5e4db 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -3,6 +3,8 @@  import re
  from urllib import quote, unquote
 +from random import randrange
 +
  from module.plugins.Hoster import Hoster
  class RealdebridCom(Hoster):
 @@ -16,7 +18,13 @@ class RealdebridCom(Hoster):      __author_mail__ = ("naibaf_11@yahoo.de")
      def getFilename(self, url):
 -        return unquote(url.rsplit("/", 1)[1])
 +        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 = 3
 @@ -57,12 +65,10 @@ class RealdebridCom(Hoster):          self.log.debug("Real-Debrid: New URL: %s" % new_url)
 -        try:
 -            if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
 -                #only use when name wasnt already set
 -                pyfile.name = self.getFilename(new_url)
 -        except IndexError:
 -            pyfile.name = "Unknown_Filename.ext"
 +
 +        if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
 +            #only use when name wasnt already set
 +            pyfile.name = self.getFilename(new_url)
          self.download(new_url, disposition=True)
 | 
