summaryrefslogtreecommitdiffstats
path: root/module/FileDatabase.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r--module/FileDatabase.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py
index e371754e6..5085bc16a 100644
--- a/module/FileDatabase.py
+++ b/module/FileDatabase.py
@@ -522,8 +522,13 @@ class FileDatabaseBackend(Thread):
@queue
def getJob(self, occ):
+ if len(occ) == 1:
+ occ = "(%)" % str(occ)
+ else:
+ occ = str(occ)
+
"""return pyfile instance, which is suitable for download and dont use a occupied plugin"""
- self.c.execute("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) LIMIT 5" % str(occ)) # very bad!
+ self.c.execute("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) LIMIT 5" % occ) # very bad!
return [x[0] for x in self.c ]