summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-19 14:58:49 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-19 14:58:49 +0100
commit64f071cea59255e1b5ad26ad6ab66163ede14029 (patch)
tree00f541cb87f5eb0994b8236b3ba76ba964f96084 /pyLoadCore.py
parentMerge (diff)
downloadpyload-64f071cea59255e1b5ad26ad6ab66163ede14029.tar.xz
add_files rpc method
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 3faecb276..3a64f9802 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -709,9 +709,14 @@ class ServerMethods():
def get_collector_info(self):
return self.core.files.getInfoData(0)
- def add_files_to_package(self, pid, urls):
- #@TODO implement
- pass
+ def add_files(self, pid, links):
+ pid = int(pid)
+ self.core.files.addLinks(links, pid)
+
+ self.core.log.info(_("Added %(count)d links to package #%(package)d ") % {"count": len(links), "package": pid})
+ self.core.files.save()
+
+ return pid
def push_package_to_queue(self, id):
self.core.files.setPackageLocation(id, 1)