Fix history Live TV filter when combined with other filters

This commit is contained in:
JonnyWong16 2021-10-19 17:54:28 -07:00
parent d041c8a03b
commit b9d4f57a4e
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 9 additions and 13 deletions

View file

@ -2004,17 +2004,8 @@ class WebInterface(object):
custom_where.append(['session_history.section_id', section_id])
if 'media_type' in kwargs:
media_type = helpers.split_strip(kwargs.get('media_type', ''))
if media_type and 'all' not in media_type:
if 'live' in media_type:
media_type.remove('live')
if len(media_type):
custom_where.append(['session_history_metadata.live OR', '1'])
else:
custom_where.append(['session_history_metadata.live', '1'])
else:
custom_where.append(['session_history_metadata.live', '0'])
if media_type:
custom_where.append(['session_history.media_type', media_type])
if media_type:
custom_where.append(['media_type_live', media_type])
if 'transcode_decision' in kwargs:
transcode_decision = helpers.split_strip(kwargs.get('transcode_decision', ''))
if transcode_decision and 'all' not in transcode_decision: