diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-24 15:41:13 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-24 15:41:13 +0200 |
commit | fb145cf68c0178b9551eaae3213ec01be112bf76 (patch) | |
tree | 61d8dd381a831da4c34359b5e471e11d687f4746 /module/database/FileDatabase.py | |
parent | added some animations, code for show/hiding items (diff) | |
download | pyload-fb145cf68c0178b9551eaae3213ec01be112bf76.tar.xz |
fixed some things, so downloads works again
Diffstat (limited to 'module/database/FileDatabase.py')
-rw-r--r-- | module/database/FileDatabase.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index e065b84e2..410f1088e 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -342,7 +342,7 @@ class FileMethods(DatabaseMethods): # TODO: multi user approach @queue def getJob(self, occ): - """return pyfile ids, which are suitable for download and dont use a occupied plugin""" + """return pyfile ids, which are suitable for download and don't use a occupied plugin""" cmd = "(%s)" % ", ".join(["'%s'" % x for x in occ]) #TODO @@ -351,7 +351,7 @@ class FileMethods(DatabaseMethods): "WHERE f.plugin NOT IN %s AND f.dlstatus IN (2,3) AND p.status=0 " "ORDER BY p.packageorder ASC, f.fileorder ASC LIMIT 5") % cmd - self.c.execute(cmd) # very bad! + self.c.execute(cmd) return [x[0] for x in self.c] @@ -370,10 +370,10 @@ class FileMethods(DatabaseMethods): @queue def findDuplicates(self, id, folder, filename): - """ checks if filename exists with different id and same package """ - # TODO + """ checks if filename exists with different id and same package, dlstatus = finished """ + # TODO: also check root of package self.c.execute( - "SELECT l.plugin FROM files f INNER JOIN packages as p ON f.package=p.pid AND p.folder=? WHERE f.fid!=? AND l.status=0 AND l.name=?" + "SELECT f.plugin FROM files f INNER JOIN packages as p ON f.package=p.pid AND p.folder=? WHERE f.fid!=? AND f.dlstatus=5 AND f.name=?" , (folder, id, filename)) return self.c.fetchone() |