mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Add video and audio decision to notification options
This commit is contained in:
parent
6d152cf308
commit
0f8c122ee3
2 changed files with 20 additions and 13 deletions
|
@ -370,6 +370,8 @@ def build_notify_text(session=None, timeline=None, state=None):
|
|||
duration = helpers.convert_milliseconds_to_minutes(metadata['duration'])
|
||||
|
||||
# Default values
|
||||
video_decision = ''
|
||||
audio_decision = ''
|
||||
transcode_decision = ''
|
||||
stream_duration = 0
|
||||
view_offset = 0
|
||||
|
@ -381,18 +383,15 @@ def build_notify_text(session=None, timeline=None, state=None):
|
|||
# Session values
|
||||
if session:
|
||||
# Generate a combined transcode decision value
|
||||
if session['video_decision']:
|
||||
if session['video_decision'] == 'transcode':
|
||||
transcode_decision = 'Transcode'
|
||||
elif session['video_decision'] == 'copy' or session['audio_decision'] == 'copy':
|
||||
transcode_decision = 'Direct Stream'
|
||||
else:
|
||||
transcode_decision = 'Direct Play'
|
||||
elif session['audio_decision']:
|
||||
if session['audio_decision'] == 'transcode':
|
||||
transcode_decision = 'Transcode'
|
||||
else:
|
||||
transcode_decision = 'Direct Play'
|
||||
video_decision = session['video_decision'].title()
|
||||
audio_decision = session['audio_decision'].title()
|
||||
|
||||
if session['video_decision'] == 'transcode' or session['audio_decision'] == 'transcode':
|
||||
transcode_decision = 'Transcode'
|
||||
elif session['video_decision'] == 'copy' or session['audio_decision'] == 'copy':
|
||||
transcode_decision = 'Direct Stream'
|
||||
else:
|
||||
transcode_decision = 'Direct Play'
|
||||
|
||||
if state != 'play':
|
||||
if session['paused_counter']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue