<%doc> USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/ Filename: stream_data.html Version: 0.1 Variable names: data [list] data :: Usable parameters == Global keys == media_type Returns the type of session. Either 'episode' or 'movie'. title Returns the name of the episode or movie. user Returns the name of the user. transcode_video_dec Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'. transcode_video_codec Returns the name of the video codec for any transcode session. transcode_height Returns the value of the video height for any transcode session. transcode_width Returns the value of the video width for any transcode session. transcode_audio_dec Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'. transcode_audio_codec Returns the name of the audio codec for any transcode session. transcode_audio_channels Returns the number of audio channels for any transcode session. transcode_container Returns the type of container for any transcode session. container Returns the type of container for the original media. height Returns the value of the video height for the original media. bitrate Returns the value of the video bitrate for the original media. width Returns the value of the video width for the original media. aspect_ratio Returns the value of the video aspect ratio for the original media. video_framerate Returns the value of the video framerate for the original media. video_codec Returns the name of the video codec for the original media. audio_codec Returns the name of the audio codec for the original media. audio_channels Returns the number of audio channels for the original media. == Only if 'media_type' is 'episode' == grandparent_title Returns the name of the TV Show. DOCUMENTATION :: END % if data: <% from plexpy.common import VIDEO_RESOLUTION_OVERRIDES, AUDIO_CODEC_OVERRIDES %>

#### % if data['media_type'] == 'episode': Stream Info: ${data['grandparent_title']} - ${data['title']} (${user}) % elif data['media_type'] == 'track': Stream Info: ${data['original_title'] or data['grandparent_title']} - ${data['title']} (${user}) % else: Stream Info: ${data['title']} (${user}) % endif

% if data['current_session']:
Current session. Updated stream details below may be delayed.
% elif data['pre_tautulli']:
Pre-Tautulli history. Stream details below may be incorrect.
% endif

| Source Details |  | Stream Details
--- | --- | --- | ---

Media |  |  |
--- | --- | --- | ---
Bitrate | ${data['bitrate']} ${'kbps' if data['bitrate'] else ''} |  | ${data['stream_bitrate']} ${'kbps' if data['stream_bitrate'] else ''}
% if data['media_type'] != 'track':
Resolution | ${data['video_full_resolution']} |  | ${data['stream_video_full_resolution']}
% endif
Quality | - |  | ${data['quality_profile']}
% if data['optimized_version'] == 1:
Optimized Version | ${data['optimized_version_profile']} (${data['optimized_version_title']}) |  | -
% endif % if data['synced_version'] == 1:
Synced Version | ${data['synced_version_profile']} |  | -
% endif

Container |  |  | ${data['stream_container_decision']}
--- | --- | --- | ---
Container | ${data['container'].upper()} |  | ${data['stream_container'].upper()}

% if data['media_type'] != 'track':

Video |  |  | ${data['stream_video_decision']}
--- | --- | --- | ---
Codec | ${data['video_codec'].upper()} ${'(HW)' if data['transcode_hw_decoding'] else ''} |  | ${data['stream_video_codec'].upper()} ${'(HW)' if data['transcode_hw_encoding'] else ''}
Bitrate | ${data['video_bitrate']} ${'kbps' if data['video_bitrate'] else ''} |  | ${data['stream_video_bitrate']} ${'kbps' if data['stream_video_bitrate'] else ''}
Width | ${data['video_width']} |  | ${data['stream_video_width']}
Height | ${data['video_height']} |  | ${data['stream_video_height']}
Framerate | ${data['video_framerate']} |  | ${data['stream_video_framerate']}
Dynamic Range | ${data['video_dynamic_range']} |  | ${data['stream_video_dynamic_range']}
Aspect Ratio | ${data['aspect_ratio']} |  | -

% endif

Audio |  |  | ${data['stream_audio_decision']}
--- | --- | --- | ---
Codec | ${AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())} |  | ${AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())}
Bitrate | ${data['audio_bitrate']} ${'kbps' if data['audio_bitrate'] else ''} |  | ${data['stream_audio_bitrate']} ${'kbps' if data['stream_audio_bitrate'] else ''}
Channels | ${data['audio_channels']} |  | ${data['stream_audio_channels']}
Language | ${data['audio_language'] or 'Unknown'} |  | -

% if data['subtitles'] == 1:

Subtitles |  |  | ${'direct play' if data['stream_subtitle_decision'] not in ('transcode', 'copy', 'burn') else data['stream_subtitle_decision']}
--- | --- | --- | ---
Codec | ${data['subtitle_codec'].upper()} |  | ${data['stream_subtitle_codec'].upper() or '-'}
Language | ${data['subtitle_language'] or 'Unknown'} |  | -
% if data['subtitle_forced']:
Forced | ${bool(data['subtitle_forced'])} |  | -
% endif

% endif
% endif