mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Alias media info title to sort title
This commit is contained in:
parent
561d994328
commit
c69e68a4a8
2 changed files with 12 additions and 8 deletions
|
@ -768,13 +768,13 @@ def build_datatables_json(kwargs, dt_columns, default_sort_col=None):
|
|||
|
||||
# Build json data
|
||||
json_data = {"draw": 1,
|
||||
"columns": columns,
|
||||
"order": [{"column": order_column,
|
||||
"columns": columns,
|
||||
"order": [{"column": order_column,
|
||||
"dir": kwargs.pop("order_dir", "desc")}],
|
||||
"start": int(kwargs.pop("start", 0)),
|
||||
"length": int(kwargs.pop("length", 25)),
|
||||
"search": {"value": kwargs.pop("search", "")}
|
||||
}
|
||||
"start": int(kwargs.pop("start", 0)),
|
||||
"length": int(kwargs.pop("length", 25)),
|
||||
"search": {"value": kwargs.pop("search", "")}
|
||||
}
|
||||
return json.dumps(json_data)
|
||||
|
||||
def humanFileSize(bytes, si=False):
|
||||
|
|
|
@ -665,9 +665,13 @@ class WebInterface(object):
|
|||
# Check if datatables json_data was received.
|
||||
# If not, then build the minimal amount of json data for a query
|
||||
if not kwargs.get('json_data'):
|
||||
# Alias 'title' to 'sort_title'
|
||||
if kwargs.get('order_column') == 'title':
|
||||
kwargs['order_column'] == 'sort_title'
|
||||
|
||||
# TODO: Find some one way to automatically get the columns
|
||||
dt_columns = [("added_at", True, False),
|
||||
("title", True, True),
|
||||
("sort_title", True, True),
|
||||
("container", True, True),
|
||||
("bitrate", True, True),
|
||||
("video_codec", True, True),
|
||||
|
@ -678,7 +682,7 @@ class WebInterface(object):
|
|||
("file_size", True, False),
|
||||
("last_played", True, False),
|
||||
("play_count", True, False)]
|
||||
kwargs['json_data'] = build_datatables_json(kwargs, dt_columns, "title")
|
||||
kwargs['json_data'] = build_datatables_json(kwargs, dt_columns, "sort_title")
|
||||
|
||||
if refresh == 'true':
|
||||
refresh = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue