summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-11-30 21:25:33 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-11-30 21:25:33 +0100
commit7caec14b0a307df9f2bd9ea6a9db6977a836145b (patch)
treeef4d072f840bd1be0d7351d02dacde15c68e8d12 /pyLoadCore.py
parentWIP: package system for cli (diff)
downloadpyload-7caec14b0a307df9f2bd9ea6a9db6977a836145b.tar.xz
WIP: package system second draft - unstable
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 6532e5b91..39f440442 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -384,22 +384,10 @@ class ServerMethods():
data.append(ds)
return data
- def get_packages_collector(self):
+ def get_collector_packages(self):
data = []
for q in self.core.file_list.data["packages"]:
- ds = {
- "id": q.data.id,
- "name": q.data.package_name,
- "folder": q.data.folder,
- "files": []
- }
- for f in q.links:
- ds["files"].append({
- "name": f.status.name,
- "status": f.status.type,
- "url": f.url
- })
- data.append(ds)
+ data.append(q.data)
return data
def get_collector_files(self):
@@ -407,6 +395,18 @@ class ServerMethods():
for f in self.core.file_list.data["collector"]:
files.append(f.id)
return files
+
+ def move_file_2_package(self, fid, pid):
+ try:
+ pyfile = self.core.file_list.collector.getFile(fid)
+ self.core.file_list.packager.addFileToPackage(pid, pyfile)
+ except:
+ return
+ else:
+ self.core.file_list.collector.removeFile(fid)
+
+ def push_package_2_queue(self, id):
+ self.core.file_list.packager.pushPackage2Queue(id)
#def move_urls_up(self, ids):
# for id in ids: