summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-12 23:42:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-12 23:42:11 +0200
commitc52ee8392501ee916d85fd9da75aa08a8f014493 (patch)
tree1cd802f64a1ffe0173473fd1f044e014bee59fff /module/plugins/hooks
parentchanged version strings (diff)
downloadpyload-c52ee8392501ee916d85fd9da75aa08a8f014493.tar.xz
removed server_methods, please test everything entirely
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/Ev0InFetcher.py2
-rw-r--r--module/plugins/hooks/HotFolder.py4
-rw-r--r--module/plugins/hooks/IRCInterface.py3
-rw-r--r--module/plugins/hooks/UpdateManager.py2
4 files changed, 6 insertions, 5 deletions
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: