mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 08:42:59 -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
|
@ -1001,9 +1001,17 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
<td width="150"><strong>{episode_num00}</strong></td>
|
<td width="150"><strong>{episode_num00}</strong></td>
|
||||||
<td>The two digit episode number.</td>
|
<td>The two digit episode number.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150"><strong>{video_decision}</strong></td>
|
||||||
|
<td>The video transcode decisions for the media item.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150"><strong>{audio_decision}</strong></td>
|
||||||
|
<td>The audio transcode decisions for the media item.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150"><strong>{transcode_decision}</strong></td>
|
<td width="150"><strong>{transcode_decision}</strong></td>
|
||||||
<td>The transcode decisions for the media item.</td>
|
<td>The stream transcode decisions for the media item.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150"><strong>{year}</strong></td>
|
<td width="150"><strong>{year}</strong></td>
|
||||||
|
|
|
@ -370,6 +370,8 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||||
duration = helpers.convert_milliseconds_to_minutes(metadata['duration'])
|
duration = helpers.convert_milliseconds_to_minutes(metadata['duration'])
|
||||||
|
|
||||||
# Default values
|
# Default values
|
||||||
|
video_decision = ''
|
||||||
|
audio_decision = ''
|
||||||
transcode_decision = ''
|
transcode_decision = ''
|
||||||
stream_duration = 0
|
stream_duration = 0
|
||||||
view_offset = 0
|
view_offset = 0
|
||||||
|
@ -381,18 +383,15 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||||
# Session values
|
# Session values
|
||||||
if session:
|
if session:
|
||||||
# Generate a combined transcode decision value
|
# Generate a combined transcode decision value
|
||||||
if session['video_decision']:
|
video_decision = session['video_decision'].title()
|
||||||
if session['video_decision'] == 'transcode':
|
audio_decision = session['audio_decision'].title()
|
||||||
|
|
||||||
|
if session['video_decision'] == 'transcode' or session['audio_decision'] == 'transcode':
|
||||||
transcode_decision = 'Transcode'
|
transcode_decision = 'Transcode'
|
||||||
elif session['video_decision'] == 'copy' or session['audio_decision'] == 'copy':
|
elif session['video_decision'] == 'copy' or session['audio_decision'] == 'copy':
|
||||||
transcode_decision = 'Direct Stream'
|
transcode_decision = 'Direct Stream'
|
||||||
else:
|
else:
|
||||||
transcode_decision = 'Direct Play'
|
transcode_decision = 'Direct Play'
|
||||||
elif session['audio_decision']:
|
|
||||||
if session['audio_decision'] == 'transcode':
|
|
||||||
transcode_decision = 'Transcode'
|
|
||||||
else:
|
|
||||||
transcode_decision = 'Direct Play'
|
|
||||||
|
|
||||||
if state != 'play':
|
if state != 'play':
|
||||||
if session['paused_counter']:
|
if session['paused_counter']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue