summaryrefslogtreecommitdiffstats
path: root/module/database/FileDatabase.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-17 15:44:50 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-17 15:44:50 +0200
commit84aa569a2ec5d5fbe61270ef11e539d62ab1374e (patch)
treed0553c62738e2a0dd3aa8e9695ea4a5d16e0a498 /module/database/FileDatabase.py
parentfilesonic fix (diff)
downloadpyload-84aa569a2ec5d5fbe61270ef11e539d62ab1374e.tar.xz
skip files across packages
Diffstat (limited to 'module/database/FileDatabase.py')
-rw-r--r--module/database/FileDatabase.py4
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)