mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Make collection titles searchable in table
This commit is contained in:
parent
72215a9f44
commit
0ba755e463
3 changed files with 9 additions and 4 deletions
|
@ -581,7 +581,9 @@ def process_json_kwargs(json_kwargs):
|
|||
return params
|
||||
|
||||
|
||||
def process_datatable_rows(rows, json_data, default_sort, sort_keys=None):
|
||||
def process_datatable_rows(rows, json_data, default_sort, search_cols=None, sort_keys=None):
|
||||
if search_cols is None:
|
||||
search_cols = []
|
||||
if sort_keys is None:
|
||||
sort_keys = {}
|
||||
|
||||
|
@ -592,7 +594,7 @@ def process_datatable_rows(rows, json_data, default_sort, sort_keys=None):
|
|||
# Search results
|
||||
search_value = json_data['search']['value'].lower()
|
||||
if search_value:
|
||||
searchable_columns = [d['data'] for d in json_data['columns'] if d['searchable']]
|
||||
searchable_columns = [d['data'] for d in json_data['columns'] if d['searchable']] + search_cols
|
||||
for row in rows:
|
||||
for k, v in row.items():
|
||||
if k in sort_keys:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue