diff options
Diffstat (limited to 'pyload')
| -rw-r--r-- | pyload/manager/PluginManager.py | 7 | ||||
| -rw-r--r-- | pyload/plugins/Plugin.py | 6 | ||||
| -rw-r--r-- | pyload/plugins/addon/IRCInterface.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/addon/UpdateManager.py | 8 | ||||
| -rw-r--r-- | pyload/plugins/addon/WindowsPhoneToastNotify.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/captcha/AdsCaptcha.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/captcha/ReCaptcha.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/captcha/SolveMedia.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/crypter/BitshareCom.py (renamed from pyload/plugins/crypter/BitshareComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/CrockoCom.py (renamed from pyload/plugins/crypter/CrockoComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/CzshareCom.py (renamed from pyload/plugins/crypter/CzshareComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/DataHu.py (renamed from pyload/plugins/crypter/DataHuFolder.py) | 6 | ||||
| -rw-r--r-- | pyload/plugins/crypter/DdlstorageCom.py (renamed from pyload/plugins/crypter/DdlstorageComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/DepositfilesCom.py (renamed from pyload/plugins/crypter/DepositfilesComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/DuploadOrg.py (renamed from pyload/plugins/crypter/DuploadOrgFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/EasybytezCom.py (renamed from pyload/plugins/crypter/EasybytezComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FilebeerInfo.py (renamed from pyload/plugins/crypter/FilebeerInfoFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FilecloudIo.py (renamed from pyload/plugins/crypter/FilecloudIoFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FilefactoryCom.py (renamed from pyload/plugins/crypter/FilefactoryComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FilerNet.py (renamed from pyload/plugins/crypter/FilerNetFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FileserveCom.py (renamed from pyload/plugins/crypter/FileserveComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FilesonicCom.py (renamed from pyload/plugins/crypter/FilesonicComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FiredriveCom.py (renamed from pyload/plugins/crypter/FiredriveComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FreakhareCom.py (renamed from pyload/plugins/crypter/FreakhareComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/FshareVn.py (renamed from pyload/plugins/crypter/FshareVnFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/HotfileCom.py (renamed from pyload/plugins/crypter/HotfileComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/JunocloudMe.py (renamed from pyload/plugins/crypter/JunocloudMeFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/LetitbitNet.py (renamed from pyload/plugins/crypter/LetitbitNetFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/LinkSaveIn.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/crypter/MediafireCom.py (renamed from pyload/plugins/crypter/MediafireComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/MegaRapidCz.py (renamed from pyload/plugins/crypter/MegaRapidCzFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/MegauploadCom.py (renamed from pyload/plugins/crypter/MegauploadComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/MultiUpOrg.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/crypter/OronCom.py (renamed from pyload/plugins/crypter/OronComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/QuickshareCz.py (renamed from pyload/plugins/crypter/QuickshareCzFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/RapidfileshareNet.py (renamed from pyload/plugins/crypter/RapidfileshareNetFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/SharingmatrixCom.py (renamed from pyload/plugins/crypter/SharingmatrixComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/SpeedLoadOrg.py (renamed from pyload/plugins/crypter/SpeedLoadOrgFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/TurbobitNet.py (renamed from pyload/plugins/crypter/TurbobitNetFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/TusfilesNet.py (renamed from pyload/plugins/crypter/TusfilesNetFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/UlozTo.py (renamed from pyload/plugins/crypter/UlozToFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/UploadableCh.py (renamed from pyload/plugins/crypter/UploadableChFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/UploadedTo.py (renamed from pyload/plugins/crypter/UploadedToFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/WuploadCom.py (renamed from pyload/plugins/crypter/WuploadComFolder.py) | 4 | ||||
| -rw-r--r-- | pyload/plugins/crypter/XFileSharingPro.py (renamed from pyload/plugins/crypter/XFileSharingProFolder.py) | 6 | ||||
| -rw-r--r-- | pyload/plugins/hook/BypassCaptcha.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/hook/Captcha9kw.py | 3 | ||||
| -rw-r--r-- | pyload/plugins/hook/CaptchaBrotherhood.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/hook/DeathByCaptcha.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/hook/ExpertDecoders.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/hook/ImageTyperz.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/hook/XFileSharingPro.py | 16 | ||||
| -rw-r--r-- | pyload/plugins/hoster/GigapetaCom.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/hoster/QuickshareCz.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/internal/BasePlugin.py (renamed from pyload/plugins/hoster/BasePlugin.py) | 0 | ||||
| -rw-r--r-- | pyload/plugins/internal/Captcha.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/internal/DeadCrypter.py | 3 | ||||
| -rw-r--r-- | pyload/plugins/internal/DeadHoster.py | 3 | ||||
| -rw-r--r-- | pyload/plugins/internal/SimpleCrypter.py | 22 | ||||
| -rw-r--r-- | pyload/plugins/internal/SimpleHoster.py | 46 | ||||
| -rw-r--r-- | pyload/plugins/internal/UpdateManager.py | 8 | ||||
| -rw-r--r-- | pyload/plugins/internal/XFSAccount.py | 5 | ||||
| -rw-r--r-- | pyload/plugins/internal/XFSHoster.py | 4 | 
63 files changed, 111 insertions, 210 deletions
| diff --git a/pyload/manager/PluginManager.py b/pyload/manager/PluginManager.py index f91279d77..8f837587a 100644 --- a/pyload/manager/PluginManager.py +++ b/pyload/manager/PluginManager.py @@ -187,8 +187,9 @@ class PluginManager:                  res.append((url, last[0]))                  continue -            for name, value in chain(self.crypterPlugins.iteritems(), self.hosterPlugins.iteritems(), -                                     self.containerPlugins.iteritems()): +            for name, value in (self.crypterPlugins.iteritems(), +                                self.hosterPlugins.iteritems(), +                                self.containerPlugins.iteritems()):                  try:                      m = value['re'].match(url)                  except KeyError: @@ -220,7 +221,7 @@ class PluginManager:          if not plugin:              self.core.log.warning("Plugin %s not found" % name) -            plugin = self.hosterPlugins['BasePlugin'] +            plugin = self.internalPlugins['BasePlugin']          if "new_module" in plugin and not original:              return plugin['new_module'] diff --git a/pyload/plugins/Plugin.py b/pyload/plugins/Plugin.py index 0b8e02512..2d9837b52 100644 --- a/pyload/plugins/Plugin.py +++ b/pyload/plugins/Plugin.py @@ -371,7 +371,7 @@ class Plugin(Base):          """ abort and give reason """          if reason:              self.pyfile.error = str(reason) -        raise Abort  #@TODO: Use raise Abort(reason) in 0.4.10 +        raise Abort      def error(self, reason="", type=""): @@ -389,14 +389,14 @@ class Plugin(Base):          """ fail and indicate file is offline """          if reason:              self.pyfile.error = str(reason) -        raise Fail("offline")  #@TODO: Use raise Fail("offline", reason) in 0.4.10 +        raise Fail("offline")      def tempOffline(self, reason=""):          """ fail and indicates file ist temporary offline, the core may take consequences """          if reason:              self.pyfile.error = str(reason) -        raise Fail("temp. offline")  #@TODO: Use raise Fail("temp. offline", reason) in 0.4.10 +        raise Fail("temp. offline")      def retry(self, max_tries=5, wait_time=1, reason=""): diff --git a/pyload/plugins/addon/IRCInterface.py b/pyload/plugins/addon/IRCInterface.py index d06dad07f..cbb97038b 100644 --- a/pyload/plugins/addon/IRCInterface.py +++ b/pyload/plugins/addon/IRCInterface.py @@ -89,7 +89,7 @@ class IRCInterface(Thread, Addon):          self.sock.connect((host, self.getConfig("port")))          if self.getConfig("ssl"): -            self.sock = ssl.wrap_socket(self.sock, cert_reqs=ssl.CERT_NONE)  #@TODO: support certificate +            self.sock = ssl.wrap_socket(self.sock, cert_reqs=ssl.CERT_NONE)  #@TODO: support custom certificate          nick = self.getConfig("nick")          self.sock.send("NICK %s\r\n" % nick) diff --git a/pyload/plugins/addon/UpdateManager.py b/pyload/plugins/addon/UpdateManager.py index 651cdde80..4a7fa736a 100644 --- a/pyload/plugins/addon/UpdateManager.py +++ b/pyload/plugins/addon/UpdateManager.py @@ -187,7 +187,7 @@ class UpdateManager(Addon):          for plugin in upgradable:              filename = plugin['name'] -            prefix   = plugin['type'] +            type     = plugin['type']              version  = plugin['version']              if filename.endswith(".pyc"): @@ -195,12 +195,6 @@ class UpdateManager(Addon):              else:                  name = filename.replace(".py", "") -            #@TODO: obsolete after 0.4.10 -            if prefix.endswith("s"): -                type = prefix[:-1] -            else: -                type = prefix -              plugins = getattr(self.core.pluginManager, "%sPlugins" % type)              oldver = float(plugins[name]['v']) if name in plugins else None diff --git a/pyload/plugins/addon/WindowsPhoneToastNotify.py b/pyload/plugins/addon/WindowsPhoneToastNotify.py index abcd6c55c..4c57ff72c 100644 --- a/pyload/plugins/addon/WindowsPhoneToastNotify.py +++ b/pyload/plugins/addon/WindowsPhoneToastNotify.py @@ -21,10 +21,6 @@ class WindowsPhoneToastNotify(Addon):      __authors__     = [("Andy Voigt", "phone-support@hotmail.de")] -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 - -      def getXmlData(self):          myxml = ("<?xml version='1.0' encoding='utf-8'?> <wp:Notification xmlns:wp='WPNotification'> "                   "<wp:Toast> <wp:Text1>Pyload Mobile</wp:Text1> <wp:Text2>Captcha waiting!</wp:Text2> " diff --git a/pyload/plugins/captcha/AdsCaptcha.py b/pyload/plugins/captcha/AdsCaptcha.py index 4eabfbf9b..845205e4c 100644 --- a/pyload/plugins/captcha/AdsCaptcha.py +++ b/pyload/plugins/captcha/AdsCaptcha.py @@ -27,7 +27,7 @@ class AdsCaptcha(Captcha):                  html = self.plugin.html              else:                  errmsg = _("AdsCaptcha html not found") -                self.plugin.fail(errmsg) +                self.plugin.error(errmsg)                  raise TypeError(errmsg)          m = re.search(self.ID_PATTERN, html) @@ -47,7 +47,7 @@ class AdsCaptcha(Captcha):                  key = self.key              else:                  errmsg = _("AdsCaptcha key not found") -                self.plugin.fail(errmsg) +                self.plugin.error(errmsg)                  raise TypeError(errmsg)          CaptchaId, PublicKey = key diff --git a/pyload/plugins/captcha/ReCaptcha.py b/pyload/plugins/captcha/ReCaptcha.py index d68584c9d..4516b76de 100644 --- a/pyload/plugins/captcha/ReCaptcha.py +++ b/pyload/plugins/captcha/ReCaptcha.py @@ -25,7 +25,7 @@ class ReCaptcha(Captcha):                  html = self.plugin.html              else:                  errmsg = _("ReCaptcha html not found") -                self.plugin.fail(errmsg) +                self.plugin.error(errmsg)                  raise TypeError(errmsg)          m = re.search(self.KEY_PATTERN, html) or re.search(self.KEY_AJAX_PATTERN, html) @@ -44,7 +44,7 @@ class ReCaptcha(Captcha):                  key = self.key              else:                  errmsg = _("ReCaptcha key not found") -                self.plugin.fail(errmsg) +                self.plugin.error(errmsg)                  raise TypeError(errmsg)          js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key}) diff --git a/pyload/plugins/captcha/SolveMedia.py b/pyload/plugins/captcha/SolveMedia.py index d1b9eba6a..82f1c4722 100644 --- a/pyload/plugins/captcha/SolveMedia.py +++ b/pyload/plugins/captcha/SolveMedia.py @@ -24,7 +24,7 @@ class SolveMedia(Captcha):                  key = self.key              else:                  errmsg = _("SolveMedia key not found") -                self.plugin.fail(errmsg) +                self.plugin.error(errmsg)                  raise TypeError(errmsg)          html = self.plugin.req.load("http://api.solvemedia.com/papi/challenge.noscript", get={'k': key}) diff --git a/pyload/plugins/crypter/BitshareComFolder.py b/pyload/plugins/crypter/BitshareCom.py index 4dbeafdb3..723faf594 100644 --- a/pyload/plugins/crypter/BitshareComFolder.py +++ b/pyload/plugins/crypter/BitshareCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class BitshareComFolder(SimpleCrypter): -    __name__    = "BitshareComFolder" +class BitshareCom(SimpleCrypter): +    __name__    = "BitshareCom"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/CrockoComFolder.py b/pyload/plugins/crypter/CrockoCom.py index 7c96161a5..c959fa70a 100644 --- a/pyload/plugins/crypter/CrockoComFolder.py +++ b/pyload/plugins/crypter/CrockoCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class CrockoComFolder(SimpleCrypter): -    __name__    = "CrockoComFolder" +class CrockoCom(SimpleCrypter): +    __name__    = "CrockoCom"      __type__    = "crypter"      __version__ = "0.01" diff --git a/pyload/plugins/crypter/CzshareComFolder.py b/pyload/plugins/crypter/CzshareCom.py index bfca84360..b79f540ff 100644 --- a/pyload/plugins/crypter/CzshareComFolder.py +++ b/pyload/plugins/crypter/CzshareCom.py @@ -4,8 +4,8 @@ import re  from pyload.plugins.internal.Crypter import Crypter -class CzshareComFolder(Crypter): -    __name__    = "CzshareComFolder" +class CzshareCom(Crypter): +    __name__    = "CzshareCom"      __type__    = "crypter"      __version__ = "0.2" diff --git a/pyload/plugins/crypter/DataHuFolder.py b/pyload/plugins/crypter/DataHu.py index b65c39904..2a02e03c8 100644 --- a/pyload/plugins/crypter/DataHuFolder.py +++ b/pyload/plugins/crypter/DataHu.py @@ -5,8 +5,8 @@ import re  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class DataHuFolder(SimpleCrypter): -    __name__    = "DataHuFolder" +class DataHu(SimpleCrypter): +    __name__    = "DataHu"      __type__    = "crypter"      __version__ = "0.06" @@ -25,7 +25,7 @@ class DataHuFolder(SimpleCrypter):      def prepare(self): -        super(DataHuFolder, self).prepare() +        super(DataHu, self).prepare()          if u'K\xe9rlek add meg a jelsz\xf3t' in self.html:  # Password protected              password = self.getPassword() diff --git a/pyload/plugins/crypter/DdlstorageComFolder.py b/pyload/plugins/crypter/DdlstorageCom.py index 9851f92c1..b4a8d07b4 100644 --- a/pyload/plugins/crypter/DdlstorageComFolder.py +++ b/pyload/plugins/crypter/DdlstorageCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo -class DdlstorageComFolder(DeadCrypter): -    __name__    = "DdlstorageComFolder" +class DdlstorageCom(DeadCrypter): +    __name__    = "DdlstorageCom"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/DepositfilesComFolder.py b/pyload/plugins/crypter/DepositfilesCom.py index 65d73afa8..9ba211607 100644 --- a/pyload/plugins/crypter/DepositfilesComFolder.py +++ b/pyload/plugins/crypter/DepositfilesCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class DepositfilesComFolder(SimpleCrypter): -    __name__    = "DepositfilesComFolder" +class DepositfilesCom(SimpleCrypter): +    __name__    = "DepositfilesCom"      __type__    = "crypter"      __version__ = "0.01" diff --git a/pyload/plugins/crypter/DuploadOrgFolder.py b/pyload/plugins/crypter/DuploadOrg.py index 138db9f03..fdb51021b 100644 --- a/pyload/plugins/crypter/DuploadOrgFolder.py +++ b/pyload/plugins/crypter/DuploadOrg.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class DuploadOrgFolder(DeadCrypter): -    __name__    = "DuploadOrgFolder" +class DuploadOrg(DeadCrypter): +    __name__    = "DuploadOrg"      __type__    = "crypter"      __version__ = "0.02" diff --git a/pyload/plugins/crypter/EasybytezComFolder.py b/pyload/plugins/crypter/EasybytezCom.py index 482ce594b..4cd86e9b6 100644 --- a/pyload/plugins/crypter/EasybytezComFolder.py +++ b/pyload/plugins/crypter/EasybytezCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.XFSCrypter import XFSCrypter -class EasybytezComFolder(XFSCrypter): -    __name__    = "EasybytezComFolder" +class EasybytezCom(XFSCrypter): +    __name__    = "EasybytezCom"      __type__    = "crypter"      __version__ = "0.10" diff --git a/pyload/plugins/crypter/FilebeerInfoFolder.py b/pyload/plugins/crypter/FilebeerInfo.py index e361b4e1d..75714c81a 100644 --- a/pyload/plugins/crypter/FilebeerInfoFolder.py +++ b/pyload/plugins/crypter/FilebeerInfo.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class FilebeerInfoFolder(DeadCrypter): -    __name__    = "FilebeerInfoFolder" +class FilebeerInfo(DeadCrypter): +    __name__    = "FilebeerInfo"      __type__    = "crypter"      __version__ = "0.02" diff --git a/pyload/plugins/crypter/FilecloudIoFolder.py b/pyload/plugins/crypter/FilecloudIo.py index c470cef03..6c8369925 100644 --- a/pyload/plugins/crypter/FilecloudIoFolder.py +++ b/pyload/plugins/crypter/FilecloudIo.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class FilecloudIoFolder(SimpleCrypter): -    __name__    = "FilecloudIoFolder" +class FilecloudIo(SimpleCrypter): +    __name__    = "FilecloudIo"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/FilefactoryComFolder.py b/pyload/plugins/crypter/FilefactoryCom.py index 8fb3efc72..9792bb9f1 100644 --- a/pyload/plugins/crypter/FilefactoryComFolder.py +++ b/pyload/plugins/crypter/FilefactoryCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class FilefactoryComFolder(SimpleCrypter): -    __name__    = "FilefactoryComFolder" +class FilefactoryCom(SimpleCrypter): +    __name__    = "FilefactoryCom"      __type__    = "crypter"      __version__ = "0.31" diff --git a/pyload/plugins/crypter/FilerNetFolder.py b/pyload/plugins/crypter/FilerNet.py index 5e43fda91..4d28dc0da 100644 --- a/pyload/plugins/crypter/FilerNetFolder.py +++ b/pyload/plugins/crypter/FilerNet.py @@ -3,8 +3,8 @@ import re  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class FilerNetFolder(SimpleCrypter): -    __name__    = "FilerNetFolder" +class FilerNet(SimpleCrypter): +    __name__    = "FilerNet"      __type__    = "crypter"      __version__ = "0.41" diff --git a/pyload/plugins/crypter/FileserveComFolder.py b/pyload/plugins/crypter/FileserveCom.py index c08e174ed..5ccccfc16 100644 --- a/pyload/plugins/crypter/FileserveComFolder.py +++ b/pyload/plugins/crypter/FileserveCom.py @@ -5,8 +5,8 @@ import re  from pyload.plugins.internal.Crypter import Crypter -class FileserveComFolder(Crypter): -    __name__    = "FileserveComFolder" +class FileserveCom(Crypter): +    __name__    = "FileserveCom"      __type__    = "crypter"      __version__ = "0.11" diff --git a/pyload/plugins/crypter/FilesonicComFolder.py b/pyload/plugins/crypter/FilesonicCom.py index 992915ab5..33a99f0d5 100644 --- a/pyload/plugins/crypter/FilesonicComFolder.py +++ b/pyload/plugins/crypter/FilesonicCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class FilesonicComFolder(DeadCrypter): -    __name__    = "FilesonicComFolder" +class FilesonicCom(DeadCrypter): +    __name__    = "FilesonicCom"      __type__    = "crypter"      __version__ = "0.12" diff --git a/pyload/plugins/crypter/FiredriveComFolder.py b/pyload/plugins/crypter/FiredriveCom.py index f6e6b8670..7ef84c8ff 100644 --- a/pyload/plugins/crypter/FiredriveComFolder.py +++ b/pyload/plugins/crypter/FiredriveCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class FiredriveComFolder(DeadCrypter): -    __name__    = "FiredriveComFolder" +class FiredriveCom(DeadCrypter): +    __name__    = "FiredriveCom"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/FreakhareComFolder.py b/pyload/plugins/crypter/FreakhareCom.py index f5e31ea42..792badeb4 100644 --- a/pyload/plugins/crypter/FreakhareComFolder.py +++ b/pyload/plugins/crypter/FreakhareCom.py @@ -5,8 +5,8 @@ import re  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class FreakhareComFolder(SimpleCrypter): -    __name__    = "FreakhareComFolder" +class FreakhareCom(SimpleCrypter): +    __name__    = "FreakhareCom"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/FshareVnFolder.py b/pyload/plugins/crypter/FshareVn.py index 0c0a79495..8b22b8bf2 100644 --- a/pyload/plugins/crypter/FshareVnFolder.py +++ b/pyload/plugins/crypter/FshareVn.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class FshareVnFolder(SimpleCrypter): -    __name__    = "FshareVnFolder" +class FshareVn(SimpleCrypter): +    __name__    = "FshareVn"      __type__    = "crypter"      __version__ = "0.01" diff --git a/pyload/plugins/crypter/HotfileComFolder.py b/pyload/plugins/crypter/HotfileCom.py index 1ce901866..1c1dcb76b 100644 --- a/pyload/plugins/crypter/HotfileComFolder.py +++ b/pyload/plugins/crypter/HotfileCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class HotfileComFolder(DeadCrypter): -    __name__    = "HotfileComFolder" +class HotfileCom(DeadCrypter): +    __name__    = "HotfileCom"      __type__    = "crypter"      __version__ = "0.3" diff --git a/pyload/plugins/crypter/JunocloudMeFolder.py b/pyload/plugins/crypter/JunocloudMe.py index 2e529169f..3036be616 100644 --- a/pyload/plugins/crypter/JunocloudMeFolder.py +++ b/pyload/plugins/crypter/JunocloudMe.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.XFSCrypter import XFSCrypter -class JunocloudMeFolder(XFSCrypter): -    __name__    = "JunocloudMeFolder" +class JunocloudMe(XFSCrypter): +    __name__    = "JunocloudMe"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/LetitbitNetFolder.py b/pyload/plugins/crypter/LetitbitNet.py index 09e6c398d..6942aa3ca 100644 --- a/pyload/plugins/crypter/LetitbitNetFolder.py +++ b/pyload/plugins/crypter/LetitbitNet.py @@ -4,8 +4,8 @@ import re  from pyload.plugins.internal.Crypter import Crypter -class LetitbitNetFolder(Crypter): -    __name__    = "LetitbitNetFolder" +class LetitbitNet(Crypter): +    __name__    = "LetitbitNet"      __type__    = "crypter"      __version__ = "0.1" diff --git a/pyload/plugins/crypter/LinkSaveIn.py b/pyload/plugins/crypter/LinkSaveIn.py index 44a31a1b1..b45904c2e 100644 --- a/pyload/plugins/crypter/LinkSaveIn.py +++ b/pyload/plugins/crypter/LinkSaveIn.py @@ -148,7 +148,7 @@ class LinkSaveIn(SimpleCrypter):          if not self.js:              self.logDebug("No JS -> skip Web links")          else: -        #@TODO: Gather paginated web links +            #@TODO: Gather paginated web links              pattern = r'<a href="http://linksave\.in/(\w{43})"'              ids = re.findall(pattern, self.html)              self.logDebug("Decrypting %d Web links" % len(ids)) diff --git a/pyload/plugins/crypter/MediafireComFolder.py b/pyload/plugins/crypter/MediafireCom.py index a1cd84fa0..392f59c52 100644 --- a/pyload/plugins/crypter/MediafireComFolder.py +++ b/pyload/plugins/crypter/MediafireCom.py @@ -6,8 +6,8 @@ from pyload.plugins.hoster.MediafireCom import checkHTMLHeader  from pyload.utils import json_loads -class MediafireComFolder(Crypter): -    __name__    = "MediafireComFolder" +class MediafireCom(Crypter): +    __name__    = "MediafireCom"      __type__    = "crypter"      __version__ = "0.14" diff --git a/pyload/plugins/crypter/MegaRapidCzFolder.py b/pyload/plugins/crypter/MegaRapidCz.py index 4a2344051..da797965e 100644 --- a/pyload/plugins/crypter/MegaRapidCzFolder.py +++ b/pyload/plugins/crypter/MegaRapidCz.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class MegaRapidCzFolder(SimpleCrypter): -    __name__    = "MegaRapidCzFolder" +class MegaRapidCz(SimpleCrypter): +    __name__    = "MegaRapidCz"      __type__    = "crypter"      __version__ = "0.02" diff --git a/pyload/plugins/crypter/MegauploadComFolder.py b/pyload/plugins/crypter/MegauploadCom.py index 7e79863d2..57c08bd53 100644 --- a/pyload/plugins/crypter/MegauploadComFolder.py +++ b/pyload/plugins/crypter/MegauploadCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class MegauploadComFolder(DeadCrypter): -    __name__    = "MegauploadComFolder" +class MegauploadCom(DeadCrypter): +    __name__    = "MegauploadCom"      __type__    = "crypter"      __version__ = "0.02" diff --git a/pyload/plugins/crypter/MultiUpOrg.py b/pyload/plugins/crypter/MultiUpOrg.py index 81e204c72..ba5549683 100644 --- a/pyload/plugins/crypter/MultiUpOrg.py +++ b/pyload/plugins/crypter/MultiUpOrg.py @@ -15,7 +15,7 @@ class MultiUpOrg(SimpleCrypter):      __config__  = [("use_subfolder", "bool", "Save package to subfolder", True),                     ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] -    __description__ = """MultiUp.org crypter plugin""" +    __description__ = """MultiUp.org decrypter plugin"""      __license__     = "GPLv3"      __authors__     = [("Walter Purcaro", "vuolter@gmail.com")] diff --git a/pyload/plugins/crypter/OronComFolder.py b/pyload/plugins/crypter/OronCom.py index dad59099f..c92666a5b 100644 --- a/pyload/plugins/crypter/OronComFolder.py +++ b/pyload/plugins/crypter/OronCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class OronComFolder(DeadCrypter): -    __name__    = "OronComFolder" +class OronCom(DeadCrypter): +    __name__    = "OronCom"      __type__    = "crypter"      __version__ = "0.11" diff --git a/pyload/plugins/crypter/QuickshareCzFolder.py b/pyload/plugins/crypter/QuickshareCz.py index b3f3f2335..156c5feeb 100644 --- a/pyload/plugins/crypter/QuickshareCzFolder.py +++ b/pyload/plugins/crypter/QuickshareCz.py @@ -4,8 +4,8 @@ import re  from pyload.plugins.internal.Crypter import Crypter -class QuickshareCzFolder(Crypter): -    __name__    = "QuickshareCzFolder" +class QuickshareCz(Crypter): +    __name__    = "QuickshareCz"      __type__    = "crypter"      __version__ = "0.1" diff --git a/pyload/plugins/crypter/RapidfileshareNetFolder.py b/pyload/plugins/crypter/RapidfileshareNet.py index daf4c1311..bc318a01e 100644 --- a/pyload/plugins/crypter/RapidfileshareNetFolder.py +++ b/pyload/plugins/crypter/RapidfileshareNet.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.XFSCrypter import XFSCrypter -class RapidfileshareNetFolder(XFSCrypter): -    __name__    = "RapidfileshareNetFolder" +class RapidfileshareNet(XFSCrypter): +    __name__    = "RapidfileshareNet"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/SharingmatrixComFolder.py b/pyload/plugins/crypter/SharingmatrixCom.py index a8ab3226a..28906ae7b 100644 --- a/pyload/plugins/crypter/SharingmatrixComFolder.py +++ b/pyload/plugins/crypter/SharingmatrixCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class SharingmatrixComFolder(DeadCrypter): -    __name__    = "SharingmatrixComFolder" +class SharingmatrixCom(DeadCrypter): +    __name__    = "SharingmatrixCom"      __type__    = "crypter"      __version__ = "0.01" diff --git a/pyload/plugins/crypter/SpeedLoadOrgFolder.py b/pyload/plugins/crypter/SpeedLoadOrg.py index 5b66b7ea6..46c9b8552 100644 --- a/pyload/plugins/crypter/SpeedLoadOrgFolder.py +++ b/pyload/plugins/crypter/SpeedLoadOrg.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class SpeedLoadOrgFolder(DeadCrypter): -    __name__    = "SpeedLoadOrgFolder" +class SpeedLoadOrg(DeadCrypter): +    __name__    = "SpeedLoadOrg"      __type__    = "crypter"      __version__ = "0.3" diff --git a/pyload/plugins/crypter/TurbobitNetFolder.py b/pyload/plugins/crypter/TurbobitNet.py index 096cc92c0..e038b9a34 100644 --- a/pyload/plugins/crypter/TurbobitNetFolder.py +++ b/pyload/plugins/crypter/TurbobitNet.py @@ -6,8 +6,8 @@ from pyload.plugins.internal.SimpleCrypter import SimpleCrypter  from pyload.utils import json_loads -class TurbobitNetFolder(SimpleCrypter): -    __name__    = "TurbobitNetFolder" +class TurbobitNet(SimpleCrypter): +    __name__    = "TurbobitNet"      __type__    = "crypter"      __version__ = "0.05" diff --git a/pyload/plugins/crypter/TusfilesNetFolder.py b/pyload/plugins/crypter/TusfilesNet.py index 8ca1ada00..d8f0b604a 100644 --- a/pyload/plugins/crypter/TusfilesNetFolder.py +++ b/pyload/plugins/crypter/TusfilesNet.py @@ -7,8 +7,8 @@ from urlparse import urljoin  from pyload.plugins.internal.XFSCrypter import XFSCrypter -class TusfilesNetFolder(XFSCrypter): -    __name__    = "TusfilesNetFolder" +class TusfilesNet(XFSCrypter): +    __name__    = "TusfilesNet"      __type__    = "crypter"      __version__ = "0.06" diff --git a/pyload/plugins/crypter/UlozToFolder.py b/pyload/plugins/crypter/UlozTo.py index fe64d41bb..8538736ca 100644 --- a/pyload/plugins/crypter/UlozToFolder.py +++ b/pyload/plugins/crypter/UlozTo.py @@ -4,8 +4,8 @@ import re  from pyload.plugins.internal.Crypter import Crypter -class UlozToFolder(Crypter): -    __name__    = "UlozToFolder" +class UlozTo(Crypter): +    __name__    = "UlozTo"      __type__    = "crypter"      __version__ = "0.2" diff --git a/pyload/plugins/crypter/UploadableChFolder.py b/pyload/plugins/crypter/UploadableCh.py index 8fff41c16..4edc08846 100644 --- a/pyload/plugins/crypter/UploadableChFolder.py +++ b/pyload/plugins/crypter/UploadableCh.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class UploadableChFolder(SimpleCrypter): -    __name__    = "UploadableChFolder" +class UploadableCh(SimpleCrypter): +    __name__    = "UploadableCh"      __type__    = "crypter"      __version__ = "0.03" diff --git a/pyload/plugins/crypter/UploadedToFolder.py b/pyload/plugins/crypter/UploadedTo.py index da1354f02..1fbed5f86 100644 --- a/pyload/plugins/crypter/UploadedToFolder.py +++ b/pyload/plugins/crypter/UploadedTo.py @@ -7,8 +7,8 @@ from urlparse import urljoin  from pyload.plugins.internal.SimpleCrypter import SimpleCrypter -class UploadedToFolder(SimpleCrypter): -    __name__    = "UploadedToFolder" +class UploadedTo(SimpleCrypter): +    __name__    = "UploadedTo"      __type__    = "crypter"      __version__ = "0.42" diff --git a/pyload/plugins/crypter/WuploadComFolder.py b/pyload/plugins/crypter/WuploadCom.py index 2626a0d13..dd1c4a168 100644 --- a/pyload/plugins/crypter/WuploadComFolder.py +++ b/pyload/plugins/crypter/WuploadCom.py @@ -3,8 +3,8 @@  from pyload.plugins.internal.DeadCrypter import DeadCrypter -class WuploadComFolder(DeadCrypter): -    __name__    = "WuploadComFolder" +class WuploadCom(DeadCrypter): +    __name__    = "WuploadCom"      __type__    = "crypter"      __version__ = "0.01" diff --git a/pyload/plugins/crypter/XFileSharingProFolder.py b/pyload/plugins/crypter/XFileSharingPro.py index 89fac31ac..27de7f997 100644 --- a/pyload/plugins/crypter/XFileSharingProFolder.py +++ b/pyload/plugins/crypter/XFileSharingPro.py @@ -5,8 +5,8 @@ import re  from pyload.plugins.internal.XFSCrypter import XFSCrypter -class XFileSharingProFolder(XFSCrypter): -    __name__    = "XFileSharingProFolder" +class XFileSharingPro(XFSCrypter): +    __name__    = "XFileSharingPro"      __type__    = "crypter"      __version__ = "0.03" @@ -26,7 +26,7 @@ class XFileSharingProFolder(XFSCrypter):      def init(self): -        super(XFileSharingProFolder, self).init() +        super(XFileSharingPro, self).init()          self.__pattern__ = self.core.pluginManager.crypterPlugins[self.__name__]['pattern'] diff --git a/pyload/plugins/hook/BypassCaptcha.py b/pyload/plugins/hook/BypassCaptcha.py index 1a640ef87..c8842b1bf 100644 --- a/pyload/plugins/hook/BypassCaptcha.py +++ b/pyload/plugins/hook/BypassCaptcha.py @@ -48,10 +48,6 @@ class BypassCaptcha(Hook):      GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php" -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 - -      def getCredits(self):          res = getURL(self.GETCREDITS_URL, post={"key": self.getConfig("passkey")}) diff --git a/pyload/plugins/hook/Captcha9kw.py b/pyload/plugins/hook/Captcha9kw.py index ab5b802b0..d99ceeec3 100644 --- a/pyload/plugins/hook/Captcha9kw.py +++ b/pyload/plugins/hook/Captcha9kw.py @@ -40,8 +40,7 @@ class Captcha9kw(Hook):      API_URL = "http://www.9kw.eu/index.cgi" -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 +    def coreReady(self):          if self.getConfig("ssl"):              self.API_URL = self.API_URL.replace("http://", "https://") diff --git a/pyload/plugins/hook/CaptchaBrotherhood.py b/pyload/plugins/hook/CaptchaBrotherhood.py index 1b7e18c51..208462c14 100644 --- a/pyload/plugins/hook/CaptchaBrotherhood.py +++ b/pyload/plugins/hook/CaptchaBrotherhood.py @@ -54,10 +54,6 @@ class CaptchaBrotherhood(Hook):      API_URL = "http://www.captchabrotherhood.com/" -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 - -      def getCredits(self):          res = getURL(self.API_URL + "askCredits.aspx",                       get={"username": self.getConfig("username"), "password": self.getConfig("passkey")}) diff --git a/pyload/plugins/hook/DeathByCaptcha.py b/pyload/plugins/hook/DeathByCaptcha.py index d032c964f..e4477565c 100644 --- a/pyload/plugins/hook/DeathByCaptcha.py +++ b/pyload/plugins/hook/DeathByCaptcha.py @@ -67,10 +67,6 @@ class DeathByCaptcha(Hook):      API_URL = "http://api.dbcapi.me/api/" -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 - -      def call_api(self, api="captcha", post=False, multipart=False):          req = getRequest()          req.c.setopt(HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version]) diff --git a/pyload/plugins/hook/ExpertDecoders.py b/pyload/plugins/hook/ExpertDecoders.py index ed889319a..f57ef55bb 100644 --- a/pyload/plugins/hook/ExpertDecoders.py +++ b/pyload/plugins/hook/ExpertDecoders.py @@ -29,10 +29,6 @@ class ExpertDecoders(Hook):      API_URL = "http://www.fasttypers.org/imagepost.ashx" -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 - -      def getCredits(self):          res = getURL(self.API_URL, post={"key": self.getConfig("passkey"), "action": "balance"}) diff --git a/pyload/plugins/hook/ImageTyperz.py b/pyload/plugins/hook/ImageTyperz.py index ce6527fad..1c99d48c1 100644 --- a/pyload/plugins/hook/ImageTyperz.py +++ b/pyload/plugins/hook/ImageTyperz.py @@ -50,10 +50,6 @@ class ImageTyperz(Hook):      GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx" -    def setup(self): -        self.info = {}  #@TODO: Remove in 0.4.10 - -      def getCredits(self):          res = getURL(self.GETCREDITS_URL,                       post={'action': "REQUESTBALANCE", diff --git a/pyload/plugins/hook/XFileSharingPro.py b/pyload/plugins/hook/XFileSharingPro.py index 53033d8a4..520e30964 100644 --- a/pyload/plugins/hook/XFileSharingPro.py +++ b/pyload/plugins/hook/XFileSharingPro.py @@ -51,8 +51,7 @@ class XFileSharingPro(Hook):      def loadPattern(self):          use_builtin_list = self.getConfig('use_builtin_list') -        for type, plugin in (("hoster",  "XFileSharingPro"), -                             ("crypter", "XFileSharingProFolder")): +        for type in ("hoster", "crypter"):              every_plugin = not self.getConfig("use_%s_list" % type)              if every_plugin: @@ -69,7 +68,7 @@ class XFileSharingPro(Hook):                  if not plugin_list:                      self.logInfo(_("No %s to handle") % type) -                    self._unload(type, plugin) +                    self._unload(type)                      return                  match_list = '|'.join(sorted(plugin_list)) @@ -79,20 +78,19 @@ class XFileSharingPro(Hook):                  pattern = self.regexp[type][1] % match_list.replace('.', '\.') -            dict = self.core.pluginManager.plugins[type][plugin] +            dict = self.core.pluginManager.plugins[type]["XFileSharingPro"]              dict['pattern'] = pattern              dict['re'] = re.compile(pattern)              self.logDebug("Loaded %s pattern: %s" % (type, pattern)) -    def _unload(self, type, plugin): -        dict = self.core.pluginManager.plugins[type][plugin] +    def _unload(self, type): +        dict = self.core.pluginManager.plugins[type]["XFileSharingPro"]          dict['pattern'] = r'^unmatchable$'          dict['re'] = re.compile(dict['pattern'])      def unload(self): -        for type, plugin in (("hoster",  "XFileSharingPro"), -                             ("crypter", "XFileSharingProFolder")): -            self._unload(type, plugin) +        for type in ("hoster", "crypter"): +            self._unload(type, "XFileSharingPro") diff --git a/pyload/plugins/hoster/GigapetaCom.py b/pyload/plugins/hoster/GigapetaCom.py index 74d2b3e49..7a0eef3c9 100644 --- a/pyload/plugins/hoster/GigapetaCom.py +++ b/pyload/plugins/hoster/GigapetaCom.py @@ -44,7 +44,7 @@ class GigapetaCom(SimpleHoster):              m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I)              if m: -                download_url = m.group(1).rstrip()  #@TODO: Remove .rstrip() in 0.4.10 +                download_url = m.group(1)                  break              elif "Entered figures don`t coincide with the picture" in self.html:                  self.invalidCaptcha() diff --git a/pyload/plugins/hoster/QuickshareCz.py b/pyload/plugins/hoster/QuickshareCz.py index 5203f90c7..5123e5aa5 100644 --- a/pyload/plugins/hoster/QuickshareCz.py +++ b/pyload/plugins/hoster/QuickshareCz.py @@ -68,7 +68,7 @@ class QuickshareCz(SimpleHoster):          m = re.search(r'Location\s*:\s*(.+)', self.header, re.I)          if m is None:              self.fail(_("File not found")) -        download_url = m.group(1).rstrip()  #@TODO: Remove .rstrip() in 0.4.10 +        download_url = m.group(1)          self.logDebug("FREE URL2:" + download_url)          # check errors diff --git a/pyload/plugins/hoster/BasePlugin.py b/pyload/plugins/internal/BasePlugin.py index dd8540578..dd8540578 100644 --- a/pyload/plugins/hoster/BasePlugin.py +++ b/pyload/plugins/internal/BasePlugin.py diff --git a/pyload/plugins/internal/Captcha.py b/pyload/plugins/internal/Captcha.py index b2fd980e2..7197c390e 100644 --- a/pyload/plugins/internal/Captcha.py +++ b/pyload/plugins/internal/Captcha.py @@ -30,7 +30,7 @@ class Captcha(Plugin):                  html = self.plugin.html              else:                  errmsg = _("%s html not found") % self.__name__ -                self.plugin.fail(errmsg)  #@TODO: replace all plugin.fail(errmsg) with plugin.error(errmsg) in 0.4.10 +                self.plugin.error(errmsg)                  raise TypeError(errmsg)          m = re.search(self.KEY_PATTERN, html) diff --git a/pyload/plugins/internal/DeadCrypter.py b/pyload/plugins/internal/DeadCrypter.py index ad99c6a13..bf150f3d5 100644 --- a/pyload/plugins/internal/DeadCrypter.py +++ b/pyload/plugins/internal/DeadCrypter.py @@ -16,5 +16,4 @@ class DeadCrypter(_Crypter):      def setup(self): -        self.pyfile.error = "Crypter is no longer available" -        self.offline()  #@TODO: self.offline("Crypter is no longer available") +        self.offline("Crypter is no longer available") diff --git a/pyload/plugins/internal/DeadHoster.py b/pyload/plugins/internal/DeadHoster.py index 3c59f1489..036ed3cb6 100644 --- a/pyload/plugins/internal/DeadHoster.py +++ b/pyload/plugins/internal/DeadHoster.py @@ -24,5 +24,4 @@ class DeadHoster(_Hoster):      def setup(self): -        self.pyfile.error = "Hoster is no longer available" -        self.offline()  #@TODO: self.offline("Hoster is no longer available") +        self.offline("Hoster is no longer available") diff --git a/pyload/plugins/internal/SimpleCrypter.py b/pyload/plugins/internal/SimpleCrypter.py index 251acd6b8..460084919 100644 --- a/pyload/plugins/internal/SimpleCrypter.py +++ b/pyload/plugins/internal/SimpleCrypter.py @@ -69,21 +69,6 @@ class SimpleCrypter(Crypter):      LOGIN_PREMIUM = False -    #@TODO: remove in 0.4.10 -    def init(self): -        self.info = {} - -        account_name = (self.__name__ + ".py").replace("Folder.py", "").replace(".py", "") -        account = self.core.accountManager.getAccountPlugin(account_name) - -        if account and account.canUse(): -            self.user, data = account.selectAccount() -            self.req = account.getAccountRequest(self.user) -            self.premium = account.isPremium(self.user) - -            self.account = account - -      def prepare(self):          if self.LOGIN_ACCOUNT and not self.account:              self.fail(_("Required account not found")) @@ -162,10 +147,5 @@ class SimpleCrypter(Crypter):              self.links += self.getLinks() -    #@TODO: Remove in 0.4.10 -    def wait(self, seconds=0, reconnect=None): -        return _wait(self, seconds, reconnect) - -      def error(self, reason="", type="parse"): -        return _error(self, reason, type) +        return super(SimpleCrypter, self).error(self, reason, type) diff --git a/pyload/plugins/internal/SimpleHoster.py b/pyload/plugins/internal/SimpleHoster.py index ee8ef712b..afd61d821 100644 --- a/pyload/plugins/internal/SimpleHoster.py +++ b/pyload/plugins/internal/SimpleHoster.py @@ -14,25 +14,6 @@ from pyload.plugins.Plugin import Fail  from pyload.utils import fixup, html_unescape, parseFileSize -#@TODO: Remove in 0.4.10 and redirect to self.error instead -def _error(self, reason, type): -        if not reason and not type: -            type = "unknown" - -        msg  = _("%s error") % type.strip().capitalize() if type else _("Error") -        msg += ": " + reason.strip() if reason else "" -        msg += _(" | Plugin may be out of date") - -        raise Fail(msg) - - -#@TODO: Remove in 0.4.10 -def _wait(self, seconds, reconnect): -    if seconds: -        self.setWait(seconds, reconnect) -    super(SimpleHoster, self).wait() - -  def replace_patterns(string, ruleslist):      for r in ruleslist:          rf, rt = r @@ -108,9 +89,6 @@ def parseFileInfo(self, url="", html=""):          if hasattr(self, "OFFLINE_PATTERN") and re.search(self.OFFLINE_PATTERN, html):              info['status'] = 1 -        elif hasattr(self, "FILE_OFFLINE_PATTERN") and re.search(self.FILE_OFFLINE_PATTERN, html):  #@TODO: Remove in 0.4.10 -            info['status'] = 1 -          elif hasattr(self, "TEMP_OFFLINE_PATTERN") and re.search(self.TEMP_OFFLINE_PATTERN, html):              info['status'] = 6 @@ -121,8 +99,7 @@ def parseFileInfo(self, url="", html=""):              except:                  pass -            for pattern in ("INFO_PATTERN", "NAME_PATTERN", "SIZE_PATTERN", -                            "FILE_INFO_PATTERN", "FILE_NAME_PATTERN", "FILE_SIZE_PATTERN"):  #@TODO: Remove in 0.4.10 +            for pattern in ("INFO_PATTERN", "NAME_PATTERN", "SIZE_PATTERN"):                  try:                      info.update(re.search(getattr(self, pattern), html).groupdict())                      online = True @@ -134,12 +111,10 @@ def parseFileInfo(self, url="", html=""):                  info['status'] = 2                  if 'N' in info: -                    info['name'] = replace_patterns(info['N'].strip(), -                                                    self.FILE_NAME_REPLACEMENTS if hasattr(self, "FILE_NAME_REPLACEMENTS") else self.NAME_REPLACEMENTS)  #@TODO: Remove FILE_NAME_REPLACEMENTS check in 0.4.10 +                    info['name'] = replace_patterns(info['N'].strip(), self.NAME_REPLACEMENTS)                  if 'S' in info: -                    size = replace_patterns(info['S'] + info['U'] if 'U' in info else info['S'], -                                            self.FILE_SIZE_REPLACEMENTS if hasattr(self, "FILE_SIZE_REPLACEMENTS") else self.SIZE_REPLACEMENTS)  #@TODO: Remove FILE_SIZE_REPLACEMENTS check in 0.4.10 +                    size = replace_patterns(info['S'] + info['U'] if 'U' in info else info['S'], self.SIZE_REPLACEMENTS)                      info['size'] = parseFileSize(size)                  elif isinstance(info['size'], basestring): @@ -178,9 +153,6 @@ def create_getInfo(plugin):              if hasattr(plugin, "URL_REPLACEMENTS"):                  url = replace_patterns(url, plugin.URL_REPLACEMENTS) -            elif hasattr(plugin, "FILE_URL_REPLACEMENTS"):  #@TODO: Remove in 0.4.10 -                url = replace_patterns(url, plugin.FILE_URL_REPLACEMENTS) -              if hasattr(plugin, "TEXT_ENCODING"):                  html = getURL(url, cookies=bool(cj), decode=not plugin.TEXT_ENCODING)                  if isinstance(plugin.TEXT_ENCODING, basestring): @@ -264,8 +236,7 @@ class SimpleHoster(Hoster):          self.req.setOption("timeout", 120) -        self.pyfile.url = replace_patterns(self.pyfile.url, -                                           self.FILE_URL_REPLACEMENTS if hasattr(self, "FILE_URL_REPLACEMENTS") else self.URL_REPLACEMENTS)  #@TODO: Remove FILE_URL_REPLACEMENTS check in 0.4.10 +        self.pyfile.url = replace_patterns(self.pyfile.url, self.URL_REPLACEMENTS)          if self.premium:              self.logDebug(_("Looking for direct download link...")) @@ -315,7 +286,7 @@ class SimpleHoster(Hoster):          if parseFileInfo(self, url, html)[2] is not 2:              try: -                return re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I).group(1).rstrip()  #@TODO: Remove .rstrip() in 0.4.10 +                return re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I).group(1)              except:                  pass @@ -410,10 +381,5 @@ class SimpleHoster(Hoster):              return size <= traffic -    #@TODO: Remove in 0.4.10 -    def wait(self, seconds=0, reconnect=None): -        return _wait(self, seconds, reconnect) - -      def error(self, reason="", type="parse"): -        return _error(self, reason, type) +        return super(SimpleHoster, self).error(self, reason, type) diff --git a/pyload/plugins/internal/UpdateManager.py b/pyload/plugins/internal/UpdateManager.py index 651cdde80..4a7fa736a 100644 --- a/pyload/plugins/internal/UpdateManager.py +++ b/pyload/plugins/internal/UpdateManager.py @@ -187,7 +187,7 @@ class UpdateManager(Addon):          for plugin in upgradable:              filename = plugin['name'] -            prefix   = plugin['type'] +            type     = plugin['type']              version  = plugin['version']              if filename.endswith(".pyc"): @@ -195,12 +195,6 @@ class UpdateManager(Addon):              else:                  name = filename.replace(".py", "") -            #@TODO: obsolete after 0.4.10 -            if prefix.endswith("s"): -                type = prefix[:-1] -            else: -                type = prefix -              plugins = getattr(self.core.pluginManager, "%sPlugins" % type)              oldver = float(plugins[name]['v']) if name in plugins else None diff --git a/pyload/plugins/internal/XFSAccount.py b/pyload/plugins/internal/XFSAccount.py index 0992a8c31..df28191f1 100644 --- a/pyload/plugins/internal/XFSAccount.py +++ b/pyload/plugins/internal/XFSAccount.py @@ -35,11 +35,6 @@ class XFSAccount(Account):      LOGIN_FAIL_PATTERN = r'>(Incorrect Login or Password|Error<)' -    def __init__(self, manager, accounts):  #@TODO: remove in 0.4.10 -        self.init() -        return super(XFSAccount, self).__init__(manager, accounts) - -      def init(self):          # if not self.HOSTER_DOMAIN:              # self.fail(_("Missing HOSTER_DOMAIN")) diff --git a/pyload/plugins/internal/XFSHoster.py b/pyload/plugins/internal/XFSHoster.py index 80ddda002..87ddfab3f 100644 --- a/pyload/plugins/internal/XFSHoster.py +++ b/pyload/plugins/internal/XFSHoster.py @@ -143,7 +143,7 @@ class XFSHoster(SimpleHoster):          self.errmsg = None -        return m.group(1).strip()  #@TODO: Remove .strip() in 0.4.10 +        return m.group(1)      def handleOverriden(self): @@ -195,7 +195,7 @@ class XFSHoster(SimpleHoster):          if m is None:              self.error(_("OVR_LINK_PATTERN not found")) -        header = self.load(m.group(1).strip(), just_header=True, decode=True)  #@TODO: Remove .strip() in 0.4.10 +        header = self.load(m.group(1), just_header=True, decode=True)          if 'location' in header:  #: Direct download link              self.download(header['location'], ref=True, cookies=True, disposition=True)          else: | 
