diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-17 15:44:50 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-17 15:44:50 +0200 |
commit | 84aa569a2ec5d5fbe61270ef11e539d62ab1374e (patch) | |
tree | d0553c62738e2a0dd3aa8e9695ea4a5d16e0a498 /module/database/FileDatabase.py | |
parent | filesonic fix (diff) | |
download | pyload-84aa569a2ec5d5fbe61270ef11e539d62ab1374e.tar.xz |
skip files across packages
Diffstat (limited to 'module/database/FileDatabase.py')
-rw-r--r-- | module/database/FileDatabase.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index 7ecf81576..6ea7d1104 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -816,9 +816,9 @@ class FileMethods(): @style.queue - def findDuplicates(self, id, pid, filename): + def findDuplicates(self, id, folder, filename): """ checks if filename exists with different id and same package """ - self.c.execute("SELECT plugin FROM links where id!=? AND status=0 AND package=? AND name=?", (id, pid, filename)) + self.c.execute("SELECT l.plugin FROM links as l INNER JOIN packages as p ON l.package=p.id AND p.folder=? WHERE l.id!=? AND l.status=0 AND l.name=?", (folder, id, filename)) return self.c.fetchone() DatabaseBackend.registerSub(FileMethods) |