diff options
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/DlFreeFr.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/EdiskCz.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/Ftp.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/IfolderRu.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/OboomCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/QuickshareCz.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/UloziskoSk.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/UploadingCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/Xdcc.py | 4 |
11 files changed, 15 insertions, 15 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index ed8c8b32c..e9871e366 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -65,7 +65,7 @@ class BasePlugin(Hoster): elif e.code in (401, 403): self.log_debug("Auth required", "Received HTTP status code: %d" % e.code) - account = self.core.accountManager.getAccountPlugin('Http') + account = self.pyload.accountManager.getAccountPlugin('Http') servers = [x['login'] for x in account.get_all_accounts()] server = urlparse.urlparse(pyfile.url).netloc diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index ef64bed32..ea82d2f05 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -60,7 +60,7 @@ class DlFreeFr(SimpleHoster): def init(self): - factory = self.core.requestFactory + factory = self.pyload.requestFactory self.req = CustomBrowser(factory.bucket, factory.getOptions()) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index c29231a7b..c7c456ac2 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -40,7 +40,7 @@ class EdiskCz(SimpleHoster): action = m.group(1) self.html = self.load(url) - self.getFileInfo() + self.get_fileInfo() self.html = self.load(re.sub("/en/download/", "/en/download-slow/", url)) diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 685e7ce87..27ebed842 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -72,6 +72,6 @@ class Ftp(Hoster): res = self.load(pyfile.url, decode=False) links = [pyfile.url + x for x in res.splitlines()] self.log_debug("LINKS", links) - self.core.api.addPackage(pkgname, links) + self.pyload.api.addPackage(pkgname, links) else: self.fail(_("Unexpected server response")) diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index cc39b32cb..cc48d36dc 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -41,7 +41,7 @@ class IfolderRu(SimpleHoster): def handle_free(self, pyfile): url = "http://rusfolder.com/%s" % self.info['pattern']['ID'] self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID']) - self.getFileInfo() + self.get_fileInfo() session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups() diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 3756ef81f..386e29674 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -36,7 +36,7 @@ class OboomCom(Hoster): self.html = self.load(pyfile.url) self.get_file_id(self.pyfile.url) self.get_session_token() - self.getFileInfo(self.session_token, self.file_id) + self.get_fileInfo(self.session_token, self.file_id) self.pyfile.name = self.file_name self.pyfile.size = self.file_size if not self.premium: @@ -47,7 +47,7 @@ class OboomCom(Hoster): def load_url(self, url, get=None): if get is None: - get = dict() + get = {} return json_loads(self.load(url, get)) @@ -110,7 +110,7 @@ class OboomCom(Hoster): self.fail(_("Received invalid captcha 5 times")) - def getFileInfo(self, token, fileId): + def get_fileInfo(self, token, fileId): apiUrl = "https://api.oboom.com/1.0/info" params = {'token': token, 'items': fileId, 'http_errors': 0} diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 3af8c42de..444ec6fab 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -26,7 +26,7 @@ class QuickshareCz(SimpleHoster): def process(self, pyfile): self.html = self.load(pyfile.url) - self.getFileInfo() + self.get_fileInfo() #: Parse js variables self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index ad6283433..c5e4ba68c 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -31,7 +31,7 @@ class UloziskoSk(SimpleHoster): def process(self, pyfile): self.html = self.load(pyfile.url) - self.getFileInfo() + self.get_fileInfo() m = re.search(self.IMG_PATTERN, self.html) if m: diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 04abf15ee..b711faba4 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -36,7 +36,7 @@ class UploadingCom(SimpleHoster): pyfile.url = pyfile.url.replace("/files", "/files/get") self.html = self.load(pyfile.url) - self.getFileInfo() + self.get_fileInfo() if self.premium: self.handle_premium(pyfile) diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 2cbd42906..6d484ac61 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -27,12 +27,12 @@ class XFileSharingPro(XFSHoster): def init(self): super(XFileSharingPro, self).init() - self.__pattern__ = self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] + self.__pattern__ = self.pyload.pluginManager.hosterPlugins[self.__name__]['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 != '.') - account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) + account = self.pyload.accountManager.getAccountPlugin(self.HOSTER_NAME) if account and account.can_use(): self.account = account diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index 4a947da1b..1d8b6490b 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -34,7 +34,7 @@ class Xdcc(Hoster): def process(self, pyfile): #: Change request type - self.req = self.core.requestFactory.getRequest(self.__name__, type="XDCC") + self.req = self.pyload.requestFactory.getRequest(self.__name__, type="XDCC") self.pyfile = pyfile for _i in xrange(0, 3): @@ -187,7 +187,7 @@ class Xdcc(Hoster): self.pyfile.name = packname - download_folder = self.core.config.get("general", "download_folder") + download_folder = self.pyload.config.get("general", "download_folder") filename = fs_join(download_folder, packname) self.log_info(_("Downloading %s from %s:%d") % (packname, ip, port)) |