Fix HW transcoding indicator

This commit is contained in:
JonnyWong16 2017-10-29 11:23:53 -07:00
parent 7047829943
commit 58bcd068f2
2 changed files with 13 additions and 4 deletions

View file

@ -184,8 +184,11 @@ DOCUMENTATION :: END
% if data['media_type'] in ('movie', 'episode', 'clip'): % if data['media_type'] in ('movie', 'episode', 'clip'):
% if data['stream_video_decision'] == 'transcode': % if data['stream_video_decision'] == 'transcode':
<% <%
hw_d = ' (HW)' if data['transcode_hw_requested'] == '1' and data['transcode_hw_decode'] and data['transcode_hw_full_pipeline'] == '0' else '' hw_d = hw_e = ''
hw_e = ' (HW)' if data['transcode_hw_requested'] == '1' and data['transcode_hw_encode'] and data['transcode_hw_full_pipeline'] == '1' else '' if data['transcode_hw_requested'] == '1' and data['transcode_hw_full_pipeline'] == '0':
hw_d = ' (HW)'
elif data['transcode_hw_requested'] == '1' and data['transcode_hw_full_pipeline'] == '1':
hw_d = hw_e = ' (HW)'
%> %>
Transcode (${data['video_codec'].upper()}${hw_d} ${plexpy.common.VIDEO_RESOLUTION_OVERRIDES.get(data['video_resolution'], data['video_resolution'])} &rarr; ${data['stream_video_codec'].upper()}${hw_e} ${plexpy.common.VIDEO_RESOLUTION_OVERRIDES.get(data['stream_video_resolution'], data['stream_video_resolution'])}) Transcode (${data['video_codec'].upper()}${hw_d} ${plexpy.common.VIDEO_RESOLUTION_OVERRIDES.get(data['video_resolution'], data['video_resolution'])} &rarr; ${data['stream_video_codec'].upper()}${hw_e} ${plexpy.common.VIDEO_RESOLUTION_OVERRIDES.get(data['stream_video_resolution'], data['stream_video_resolution'])})
% elif data['stream_video_decision'] == 'copy': % elif data['stream_video_decision'] == 'copy':

View file

@ -360,8 +360,14 @@
var sv_res = s.stream_video_resolution + 'p' var sv_res = s.stream_video_resolution + 'p'
} }
if (s.stream_video_decision === 'transcode') { if (s.stream_video_decision === 'transcode') {
var hw_d = (s.transcode_hw_requested === '1' && s.transcode_hw_decode && s.transcode_hw_full_pipeline === '0') ? ' (HW)' : ' (HW)'; var hw_d = '';
var hw_e = (s.transcode_hw_requested === '1' && s.transcode_hw_encode && s.transcode_hw_full_pipeline === '1') ? ' (HW)' : ' (HW)'; var hw_e = '';
if (s.transcode_hw_requested === '1' && s.transcode_hw_full_pipeline === '0') {
hw_d = ' (HW)';
} else if (s.transcode_hw_requested === '1' && s.transcode_hw_full_pipeline === '1') {
hw_d = ' (HW)';
hw_e = ' (HW)';
}
video_decision = 'Transcode (' + s.video_codec.toUpperCase() + hw_d + ' ' + v_res + ' &rarr; ' + s.stream_video_codec.toUpperCase() + hw_e + ' ' + sv_res + ')'; video_decision = 'Transcode (' + s.video_codec.toUpperCase() + hw_d + ' ' + v_res + ' &rarr; ' + s.stream_video_codec.toUpperCase() + hw_e + ' ' + sv_res + ')';
} else if (s.stream_video_decision === 'copy') { } else if (s.stream_video_decision === 'copy') {
video_decision = 'Direct Stream (' + s.stream_video_codec.toUpperCase() + ' ' + sv_res + ')'; video_decision = 'Direct Stream (' + s.stream_video_codec.toUpperCase() + ' ' + sv_res + ')';