From 9b12691ad66269ca8b67e80516548e8ae10bd7b2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 5 Mar 2013 23:21:44 +0100 Subject: working search suggestions --- module/FileManager.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'module/FileManager.py') diff --git a/module/FileManager.py b/module/FileManager.py index 1d8cdf328..74ff2ebeb 100644 --- a/module/FileManager.py +++ b/module/FileManager.py @@ -177,7 +177,7 @@ class FileManager: return self.db.getFileInfo(fid) @lock - def getTree(self, pid, full, state): + def getTree(self, pid, full, state, search=None): """ return a TreeCollection and fill the info data of containing packages. optional filter only unfnished files """ @@ -187,7 +187,7 @@ class FileManager: root = pid if not full else None packs = self.db.getAllPackages(root) - files = self.db.getAllFiles(package=root, state=state) + files = self.db.getAllFiles(package=root, state=state, search=search) # updating from cache for fid, f in self.files.iteritems(): @@ -320,9 +320,6 @@ class FileManager: def scanDownloadFolder(self): pass - def searchFile(self, pattern): - return self.db.getAllFiles(search=pattern) - @lock @invalidate def deletePackage(self, pid): -- cgit v1.2.3