summaryrefslogtreecommitdiffstats
path: root/module/FileDatabase.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-26 14:36:44 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-26 14:36:44 +0200
commit263c8bfab4e444bc97b1ff92ffa097642e710493 (patch)
treed945c72a7a57cc7139f1c30f23c889611ead060b /module/FileDatabase.py
parentThe pyLoad Team thanks everyone who was involved in development process with ... (diff)
downloadpyload-263c8bfab4e444bc97b1ff92ffa097642e710493.tar.xz
processing some plugins in collector
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r--module/FileDatabase.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py
index 012dd8383..9064d5a03 100644
--- a/module/FileDatabase.py
+++ b/module/FileDatabase.py
@@ -310,6 +310,7 @@ class FileHandler:
"""get suitable job"""
#@TODO clean mess
+ #@TODO improve selection of valid jobs
if self.jobCache.has_key(occ):
if self.jobCache[occ]:
@@ -849,15 +850,18 @@ class FileDatabaseBackend(Thread):
@queue
def getJob(self, occ):
"""return pyfile instance, which is suitable for download and dont use a occupied plugin"""
-
+
+ #@TODO improve this hardcoded method
+ pre = "('DLC', 'LinkList', 'SerienjunkiesOrg', 'CCF', 'RSDF')" #plugins which are processed in collector
+
cmd = "("
for i, item in enumerate(occ):
if i != 0: cmd += ", "
cmd += "'%s'" % item
cmd += ")"
-
- cmd = "SELECT l.id FROM links as l INNER JOIN packages as p ON l.package=p.id WHERE p.queue=1 AND l.plugin NOT IN %s AND l.status IN (2,3,6,14) ORDER BY p.priority DESC, p.packageorder ASC, l.linkorder ASC LIMIT 5" % cmd
+
+ cmd = "SELECT l.id FROM links as l INNER JOIN packages as p ON l.package=p.id WHERE ((p.queue=1 AND l.plugin NOT IN %s) OR l.plugin IN %s) AND l.status IN (2,3,6,14) ORDER BY p.priority DESC, p.packageorder ASC, l.linkorder ASC LIMIT 5" % (cmd, pre)
self.c.execute(cmd) # very bad!