Add video and audio decision to notification options
This commit is contained in:
@@ -1001,9 +1001,17 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||
<td width="150"><strong>{episode_num00}</strong></td>
|
||||
<td>The two digit episode number.</td>
|
||||
</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>
|
||||
<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>
|
||||
<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'])
|
||||
|
||||
# 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']:
|
||||
|
Reference in New Issue
Block a user