mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-21 22:03:18 -07:00
Add user filter to history tables
This commit is contained in:
parent
33a36ec132
commit
f1f1ed88a4
2 changed files with 3 additions and 1 deletions
|
@ -60,7 +60,8 @@ class DataFactory(object):
|
||||||
'session_history.user',
|
'session_history.user',
|
||||||
'session_history_metadata.media_type',
|
'session_history_metadata.media_type',
|
||||||
'session_history_media_info.video_decision',
|
'session_history_media_info.video_decision',
|
||||||
'session_history.user_id as user_id'
|
'session_history.user_id as user_id',
|
||||||
|
'users.show_user as show_user'
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
query = data_tables.ssp_query(table_name='session_history',
|
query = data_tables.ssp_query(table_name='session_history',
|
||||||
|
|
|
@ -596,6 +596,7 @@ class WebInterface(object):
|
||||||
if 'start_date' in kwargs:
|
if 'start_date' in kwargs:
|
||||||
start_date = kwargs.get('start_date', "")
|
start_date = kwargs.get('start_date', "")
|
||||||
custom_where = [['strftime("%Y-%m-%d", datetime(date, "unixepoch", "localtime"))', start_date]]
|
custom_where = [['strftime("%Y-%m-%d", datetime(date, "unixepoch", "localtime"))', start_date]]
|
||||||
|
custom_where.append(['show_user', 1])
|
||||||
|
|
||||||
data_factory = datafactory.DataFactory()
|
data_factory = datafactory.DataFactory()
|
||||||
history = data_factory.get_history(kwargs=kwargs, custom_where=custom_where)
|
history = data_factory.get_history(kwargs=kwargs, custom_where=custom_where)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue