diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-12 23:42:11 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-12 23:42:11 +0200 |
commit | c52ee8392501ee916d85fd9da75aa08a8f014493 (patch) | |
tree | 1cd802f64a1ffe0173473fd1f044e014bee59fff /module/plugins | |
parent | changed version strings (diff) | |
download | pyload-c52ee8392501ee916d85fd9da75aa08a8f014493.tar.xz |
removed server_methods, please test everything entirely
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/Crypter.py | 4 | ||||
-rw-r--r-- | module/plugins/hooks/Ev0InFetcher.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/HotFolder.py | 4 | ||||
-rw-r--r-- | module/plugins/hooks/IRCInterface.py | 3 | ||||
-rw-r--r-- | module/plugins/hooks/UpdateManager.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py index 7ba739dc4..9c56eb91b 100644 --- a/module/plugins/Crypter.py +++ b/module/plugins/Crypter.py @@ -64,8 +64,8 @@ class Crypter(Plugin): links = [x.decode("utf-8") for x in pack[1]] - pid = self.core.server_methods.add_package(pack[0], links, self.pyfile.package().queue) + pid = self.core.api.addPackage(pack[0], links, self.pyfile.package().queue) if self.pyfile.package().password: - self.core.server_methods.set_package_data(pid, {"password": self.pyfile.package().password}) + self.core.api.setPackageData(pid, {"password": self.pyfile.package().password}) diff --git a/module/plugins/hooks/Ev0InFetcher.py b/module/plugins/hooks/Ev0InFetcher.py index f573d28a3..5eb4e09c1 100644 --- a/module/plugins/hooks/Ev0InFetcher.py +++ b/module/plugins/hooks/Ev0InFetcher.py @@ -75,7 +75,7 @@ class Ev0InFetcher(Hook, PluginStorage): links = self.filterLinks(item['description'].split("<br />")) packagename = item['title'].encode("utf-8") self.core.log.info("Ev0InFetcher: new episode '%s' (matched '%s')" % (packagename, show)) - self.core.server_methods.add_package(packagename, links, queue=(1 if self.getConfig("queue") else 0)) + self.core.api.addPackage(packagename, links, queue=(1 if self.getConfig("queue") else 0)) self.setStorage("show_%s_lastfound" % show, int(mktime(item.date_parsed))) found = True if not found: diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py index 1e320b87c..ee1031ad5 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/hooks/HotFolder.py @@ -68,7 +68,7 @@ class HotFolder(Hook): f.write(content) f.close() - self.core.server_methods.add_package(f.name, [f.name], 1) + self.core.api.addPackage(f.name, [f.name], 1) for f in listdir(self.getConfig("folder")): path = join(self.getConfig("folder"), f) @@ -80,6 +80,6 @@ class HotFolder(Hook): move(path, newpath) self.log.info(_("Added %s from HotFolder") % f) - self.core.server_methods.add_package(f, [newpath], 1) + self.core.api.addPackage(f, [newpath], 1)
\ No newline at end of file diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 8be84f863..ae0a51385 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -53,7 +53,8 @@ class IRCInterface(Thread, Hook): Thread.__init__(self) Hook.__init__(self, core, manager) self.setDaemon(True) - self.sm = core.server_methods + #self.sm = core.server_methods + self.api = core.api #todo, only use api def coreReady(self): self.new_package = {} diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 10f50d1f0..dc8eafbb8 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -65,7 +65,7 @@ class UpdateManager(Hook): """checks if an update is available""" try: - version_check = getURL("http://get.pyload.org/check/%s/" % self.core.server_methods.get_server_version()) + version_check = getURL("http://get.pyload.org/check/%s/" % self.core.api.getServerVersion()) if version_check == "": return False else: diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 49bab50f1..4b55f0357 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -33,7 +33,7 @@ class BasePlugin(Hoster): # self.decryptCaptcha("http://localhost:9000/captcha") # # if pyfile.url == "79": -# self.core.server_methods.add_package("test", [str(i) for i in range(80)], 1) +# self.core.api.addPackage("test", [str(i) for i in range(80)], 1) # # return if pyfile.url.startswith("http"): |