Filter search query by type

This commit is contained in:
shortcutme 2017-11-10 11:16:08 +01:00
parent 9b61ae44ab
commit f8fe426f70
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 2 additions and 0 deletions

View File

@ -131,6 +131,8 @@ class UiWebsocketPlugin(object):
search_like = "%" + search_text.replace(" ", "%") + "%"
params.append(search_like)
params.append(search_like)
if filters.get("type") and filters["type"] not in query:
continue
# Order
db_query.parts["ORDER BY"] = "date_added DESC"