diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-20 23:07:42 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-20 23:07:42 +0200 |
commit | 2475ddb7654d0d6fb1be18082b5c8c480befdbb3 (patch) | |
tree | b82a8b5fc0a309f69733b0a004284f4ef45833d8 /pyload/plugin/hoster | |
parent | Spare code cosmetics (9) (diff) | |
parent | added check of classname == filename (diff) | |
download | pyload-2475ddb7654d0d6fb1be18082b5c8c480befdbb3.tar.xz |
Merge branch 'pr/n10_ardi69' into 0.4.10
Conflicts:
pyload/plugin/hoster/FileserveCom.py
Diffstat (limited to 'pyload/plugin/hoster')
-rw-r--r-- | pyload/plugin/hoster/FileserveCom.py | 4 | ||||
-rw-r--r-- | pyload/plugin/hoster/NoPremiumPl.py | 2 | ||||
-rw-r--r-- | pyload/plugin/hoster/RapideoPl.py | 2 | ||||
-rw-r--r-- | pyload/plugin/hoster/XFileSharingPro.py | 4 | ||||
-rw-r--r-- | pyload/plugin/hoster/Xdcc.py | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/pyload/plugin/hoster/FileserveCom.py b/pyload/plugin/hoster/FileserveCom.py index 4530f8ff8..1d4179e5c 100644 --- a/pyload/plugin/hoster/FileserveCom.py +++ b/pyload/plugin/hoster/FileserveCom.py @@ -144,7 +144,7 @@ class FileserveCom(Hoster): if "fail" in res: self.fail(_("Failed getting wait time")) - if self.__class__.__name__ == "FilejungleCom": + if self.getClassName() == "FilejungleCom": m = re.search(r'"waitTime":(\d+)', res) if m is None: self.fail(_("Cannot get wait time")) @@ -184,7 +184,7 @@ class FileserveCom(Hoster): def handlePremium(self, pyfile): premium_url = None - if self.__class__.__name__ == "FileserveCom": + if self.getClassName() == "FileserveCom": # try api download res = self.load("http://app.fileserve.com/api/download/premium/", post={"username": self.user, diff --git a/pyload/plugin/hoster/NoPremiumPl.py b/pyload/plugin/hoster/NoPremiumPl.py index 8921afe1c..be1e4794e 100644 --- a/pyload/plugin/hoster/NoPremiumPl.py +++ b/pyload/plugin/hoster/NoPremiumPl.py @@ -79,7 +79,7 @@ class NoPremiumPl(MultiHoster): if "errno" in parsed.keys(): if parsed['errno'] in self.ERROR_CODES: # error code in known - self.fail(self.ERROR_CODES[parsed['errno']] % self.__class__.__name__) + self.fail(self.ERROR_CODES[parsed['errno']] % self.getClassName()) else: # error code isn't yet added to plugin self.fail( diff --git a/pyload/plugin/hoster/RapideoPl.py b/pyload/plugin/hoster/RapideoPl.py index e19ccc45b..35d4da0ad 100644 --- a/pyload/plugin/hoster/RapideoPl.py +++ b/pyload/plugin/hoster/RapideoPl.py @@ -79,7 +79,7 @@ class RapideoPl(MultiHoster): if "errno" in parsed.keys(): if parsed['errno'] in self.ERROR_CODES: # error code in known - self.fail(self.ERROR_CODES[parsed['errno']] % self.__class__.__name__) + self.fail(self.ERROR_CODES[parsed['errno']] % self.getClassName()) else: # error code isn't yet added to plugin self.fail( diff --git a/pyload/plugin/hoster/XFileSharingPro.py b/pyload/plugin/hoster/XFileSharingPro.py index 8274a818a..140a69a72 100644 --- a/pyload/plugin/hoster/XFileSharingPro.py +++ b/pyload/plugin/hoster/XFileSharingPro.py @@ -23,13 +23,13 @@ class XFileSharingPro(XFSHoster): def _log(self, type, args): msg = " | ".join(str(a).strip() for a in args if a) logger = getattr(self.log, type) - logger("%s: %s: %s" % (self.__class__.__name__, self.HOSTER_NAME, msg or _("%s MARK" % type.upper()))) + logger("%s: %s: %s" % (self.getClassName(), self.HOSTER_NAME, msg or _("%s MARK" % type.upper()))) def init(self): super(XFileSharingPro, self).init() - self.__pattern = self.core.pluginManager.hosterPlugins[self.__class__.__name__]['pattern'] + self.__pattern = self.core.pluginManager.hosterPlugins[self.getClassName()]['pattern'] self.HOSTER_DOMAIN = re.match(self.__pattern, self.pyfile.url).group("DOMAIN").lower() self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.') diff --git a/pyload/plugin/hoster/Xdcc.py b/pyload/plugin/hoster/Xdcc.py index e1a4c72b2..6943f495e 100644 --- a/pyload/plugin/hoster/Xdcc.py +++ b/pyload/plugin/hoster/Xdcc.py @@ -36,7 +36,7 @@ class Xdcc(Hoster): def process(self, pyfile): # change request type - self.req = pyfile.m.core.requestFactory.getRequest(self.__class__.__name__, type="XDCC") + self.req = pyfile.m.core.requestFactory.getRequest(self.getClassName(), type="XDCC") self.pyfile = pyfile for _i in xrange(0, 3): |