summaryrefslogtreecommitdiffstats
path: root/module/database/FileDatabase.py
diff options
context:
space:
mode:
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__":