diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-17 22:56:56 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-17 22:56:56 +0100 |
commit | 70cd6a9f822308a416fefb051c4bbb83e6fd37e4 (patch) | |
tree | f9ae7ae1d3ac2d57632cd23946cf3f733c37cb76 /pyLoadCore.py | |
parent | I have now django 1.1.1 ^^ (diff) | |
download | pyload-70cd6a9f822308a416fefb051c4bbb83e6fd37e4.tar.xz |
create only one links.txt package
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index 7e1b9ebfc..fc196c587 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -145,7 +145,19 @@ class Core(object): # pid = package id # lid = link/file id linkFile = self.config['general']['link_file'] - pid = self.file_list.packager.addNewPackage(package_name=linkFile) + packs = self.server_methods.get_queue() + found = False + print linkFile + for data in packs: + print data["package_name"] + if data["package_name"] == linkFile: + found = data["id"] + print "found", found + break + if found == False: + pid = self.file_list.packager.addNewPackage(package_name=linkFile) + else: + pid = found lid = self.file_list.collector.addLink(linkFile) self.file_list.packager.addFileToPackage(pid, self.file_list.collector.popFile(lid)) self.file_list.packager.pushPackage2Queue(pid) |