From 64f071cea59255e1b5ad26ad6ab66163ede14029 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 19 Nov 2010 14:58:49 +0100 Subject: add_files rpc method --- pyLoadCore.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pyLoadCore.py') 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) -- cgit v1.2.3