summaryrefslogtreecommitdiffstats
path: root/module/database/FileDatabase.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-26 20:20:21 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-26 20:20:21 +0200
commit5d0807959de238399fb49de6d0b29b5f4e4b37f1 (patch)
tree178b0f813447e54859f0b3f11432c06458dd0f90 /module/database/FileDatabase.py
parentrehost plugin, fixed some account management issues (diff)
downloadpyload-5d0807959de238399fb49de6d0b29b5f4e4b37f1.tar.xz
mirror detection/handling
Diffstat (limited to 'module/database/FileDatabase.py')
-rw-r--r--module/database/FileDatabase.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py
index 99812d2c9..3ba43f881 100644
--- a/module/database/FileDatabase.py
+++ b/module/database/FileDatabase.py
@@ -814,6 +814,13 @@ class FileMethods():
def restartFailed(self):
self.c.execute("UPDATE links SET status=3,error='' WHERE status IN (8, 9)")
+
+ @style.queue
+ def findDuplicates(self, id, pid, 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))
+ return self.c.fetchone()
+
DatabaseBackend.registerSub(FileMethods)
if __name__ == "__main__":