diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/Plugin.py | 13 | ||||
| -rw-r--r-- | module/config/core.xml | 2 | ||||
| -rw-r--r-- | module/plugins/CCF.py | 5 | ||||
| -rw-r--r-- | module/plugins/LinkList.py | 5 | ||||
| -rw-r--r-- | module/plugins/RSDF.py | 5 | ||||
| -rw-r--r-- | module/plugins/RapidshareCom.py | 4 | 
6 files changed, 12 insertions, 22 deletions
| diff --git a/module/Plugin.py b/module/Plugin.py index 14a480e3b..8e5bbcfe8 100644 --- a/module/Plugin.py +++ b/module/Plugin.py @@ -20,6 +20,8 @@  import ConfigParser  import logging  import re +from os.path import exists +  from module.network.Request import Request @@ -54,7 +56,7 @@ class Plugin():          pyfile.status.exists = self.file_exists()          if not pyfile.status.exists: -            raise Exception, "The file was not found on the server." +            raise Exception, "File not found"              return False          pyfile.status.filename = self.get_file_name() @@ -75,12 +77,15 @@ class Plugin():      def download_html(self):          """ gets the url from self.parent.url saves html in self.html and parses          """ -        html = "" -        self.html = html +        self.html = ""      def file_exists(self):          """ returns True or False          """ +        if re.search(r"(?!http://).*\.(dlc|ccf|rsdf|txt)", self.parent.url): +            return exists(self.parent.url) +        elif re.search(r"Not Found", self.parent.url): +            return False          return True      def get_file_url(self): @@ -92,7 +97,7 @@ class Plugin():          try:              return re.findall("([^\/=]+)", self.parent.url)[-1]          except: -            return "no_name" +            return self.parent.url[:20]      def wait_until(self):          if self.html != None: diff --git a/module/config/core.xml b/module/config/core.xml index 392309e1c..6da85cf32 100644 --- a/module/config/core.xml +++ b/module/config/core.xml @@ -11,7 +11,7 @@          <key>ssl.key</key>      </ssl>      <webinterface> -        <activated>False</activated> +        <activated>True</activated>          <host>0.0.0.0</host>          <port>8000</port>          <template>default</template> diff --git a/module/plugins/CCF.py b/module/plugins/CCF.py index 7b6e3397f..88b567904 100644 --- a/module/plugins/CCF.py +++ b/module/plugins/CCF.py @@ -27,11 +27,6 @@ class CCF(Plugin):          self.multi_dl = True          self.links = [] -    def file_exists(self): -        """ returns True or False -        """ -        return True -      def proceed(self, url, location):          infile = url.replace("\n", "") diff --git a/module/plugins/LinkList.py b/module/plugins/LinkList.py index ff99b0968..92508ce29 100644 --- a/module/plugins/LinkList.py +++ b/module/plugins/LinkList.py @@ -21,11 +21,6 @@ class LinkList(Plugin):          self.html = None          self.read_config() -    def file_exists(self): -        """ returns True or False -        """ -        return True -      def proceed(self, linkList, location):          tmpLinks = []          txt = open(linkList, 'r') diff --git a/module/plugins/RSDF.py b/module/plugins/RSDF.py index 5ce8fd716..0b6a63722 100644 --- a/module/plugins/RSDF.py +++ b/module/plugins/RSDF.py @@ -23,11 +23,6 @@ class RSDF(Plugin):          self.multi_dl = True          self.links = [] -    def file_exists(self): -        """ returns True or False -        """ -        return True -      def proceed(self, url, location):          from Crypto.Cipher import AES diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py index 96d526d73..2ce9a2f6f 100644 --- a/module/plugins/RapidshareCom.py +++ b/module/plugins/RapidshareCom.py @@ -15,7 +15,7 @@ class RapidshareCom(Plugin):          props['name'] = "RapidshareCom"          props['type'] = "hoster"          props['pattern'] = r"http://[\w\.]*?rapidshare.com/files/(\d*?)/(.*)" -        props['version'] = "0.9.9" +        props['version'] = "1.0"          props['description'] = """Rapidshare.com Download Plugin"""          props['author_name'] = ("spoob", "RaNaN", "mkaay")          props['author_mail'] = ("spoob@pyload.org", "ranan@pyload.org", "mkaay@mkaay.de") @@ -42,7 +42,7 @@ class RapidshareCom(Plugin):          self.download_api_data()          if self.api_data["status"] == "1": -            pyfile.status.filename = self.get_file_name() +            pyfile.status.filename = self.api_data["filename"]              if self.config["premium"]:                  self.logger.info("Rapidshare: Use Premium Account (%sGB left)" % (self.props["premkbleft"]/1000000)) | 
