diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-01 17:44:17 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-01 17:44:17 +0200 |
commit | 3c1236c5ec9d2ab45a435184315c31d3cfb35cba (patch) | |
tree | 5ecec78c8b79b5e93ead2f81a82357c13c79a624 | |
parent | reconnect fix (diff) | |
download | pyload-3c1236c5ec9d2ab45a435184315c31d3cfb35cba.tar.xz |
job fix
-rw-r--r-- | module/FileDatabase.py | 7 |
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 ] |