mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Update stream info modal
This commit is contained in:
parent
19695c220b
commit
0a42cb4135
3 changed files with 218 additions and 98 deletions
|
@ -428,7 +428,7 @@ DOCUMENTATION :: END
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="modalIncludes()">
|
<%def name="modalIncludes()">
|
||||||
<div id="info-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="info-modal">
|
<div class="modal fade" id="info-modal" tabindex="-1" role="dialog" aria-labelledby="info-modal">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,6 +38,9 @@ DOCUMENTATION :: END
|
||||||
</%doc>
|
</%doc>
|
||||||
|
|
||||||
% if data:
|
% if data:
|
||||||
|
<%
|
||||||
|
import plexpy
|
||||||
|
%>
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -51,86 +54,177 @@ DOCUMENTATION :: END
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="container-fluid">
|
<table class="stream-info" style="margin-top: 0;">
|
||||||
<div class="row">
|
<thead>
|
||||||
<div class="col-sm-12">
|
<tr>
|
||||||
<h4><strong>Stream Details</strong></h4>
|
<th>
|
||||||
</div>
|
</th>
|
||||||
<div class="col-sm-4">
|
<th class="heading">
|
||||||
<h5>Media</h5>
|
Stream Details
|
||||||
<ul class="list-unstyled">
|
</th>
|
||||||
<li>Container: <strong>${data['transcode_container'] if data['transcode_container'] else data['container']}</strong></li>
|
<th class="heading">
|
||||||
% if data['media_type'] != 'track':
|
Source Details
|
||||||
<li>Resolution: <strong>${data['transcode_height'] if data['transcode_height'] else data['height']}p</strong></li>
|
</th>
|
||||||
% endif
|
</tr>
|
||||||
</ul>
|
</thead>
|
||||||
</div>
|
</table>
|
||||||
|
<table class="stream-info">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Media
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Bitrate</td>
|
||||||
|
<td>${data['stream_bitrate']} kbps</td>
|
||||||
|
<td>${data['bitrate']} kbps</td>
|
||||||
|
</tr>
|
||||||
% if data['media_type'] != 'track':
|
% if data['media_type'] != 'track':
|
||||||
<div class="col-sm-4">
|
<tr>
|
||||||
<h5>Video</h5>
|
<td>Resolution</td>
|
||||||
<ul class="list-unstyled">
|
<td>${plexpy.common.VIDEO_RESOLUTION_OVERRIDES.get(data['stream_video_resolution'], data['stream_video_resolution'])}</td>
|
||||||
<li>Stream: <strong>${data['transcode_video_dec']}</strong></li>
|
<td>${plexpy.common.VIDEO_RESOLUTION_OVERRIDES.get(data['video_resolution'], data['video_resolution'])}</td>
|
||||||
% if data['transcode_video_dec'] != 'direct play':
|
</tr>
|
||||||
<li>Width: <strong>${data['transcode_width']}</strong></li>
|
|
||||||
<li>Height: <strong>${data['transcode_height']}</strong></li>
|
|
||||||
<li>Codec: <strong>${data['transcode_video_codec']}</strong></li>
|
|
||||||
% else:
|
|
||||||
<li>Width: <strong>${data['width']}</strong></li>
|
|
||||||
<li>Height: <strong>${data['height']}</strong></li>
|
|
||||||
<li>Codec: <strong>${data['video_codec']}</strong></li>
|
|
||||||
% endif
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
% endif
|
% endif
|
||||||
<div class="col-sm-4">
|
<tr>
|
||||||
<h5>Audio</h5>
|
<td>Quality</td>
|
||||||
<ul class="list-unstyled">
|
<td>${data['quality_profile']}</td>
|
||||||
<li>Stream: <strong>${data['transcode_audio_dec']}</strong></li>
|
<td>-</td>
|
||||||
% if data['transcode_audio_dec'] != 'direct play':
|
</tr>
|
||||||
<li>Codec: <strong>${data['transcode_audio_codec']}</strong></li>
|
% if data['optimized_version'] == 1:
|
||||||
<li>Channels: <strong>${data['transcode_audio_channels']}</strong></li>
|
<tr>
|
||||||
% else:
|
<td>Optimized Version</td>
|
||||||
<li>Codec: <strong>${data['audio_codec']}</strong></li>
|
<td>-</td>
|
||||||
<li>Channels: <strong>${data['audio_channels']}</strong></li>
|
<td>${data['optimized_version_profile']}</td>
|
||||||
% endif
|
</tr>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<h4><strong>Source Details</strong></h4>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<h5>Media</h5>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
<li>Container: <strong>${data['container']}</strong></li>
|
|
||||||
% if data['media_type'] != 'track':
|
|
||||||
<li>Resolution: <strong>${data['video_resolution'] + 'p' if data['video_resolution'] != 'sd' else data['video_resolution']}</strong></li>
|
|
||||||
% endif
|
|
||||||
<li>Bitrate: <strong>${data['bitrate']} kbps</strong></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
% if data['media_type'] != 'track':
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<h5>Video</h5>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
<li>Width: <strong>${data['width']}</strong></li>
|
|
||||||
<li>Height: <strong>${data['height']}</strong></li>
|
|
||||||
<li>Codec: <strong>${data['video_codec']}</strong></li>
|
|
||||||
<li>Aspect Ratio: <strong>${data['aspect_ratio']}</strong></li>
|
|
||||||
<li>Frame Rate: <strong>${data['video_framerate']}</strong></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
% endif
|
% endif
|
||||||
<div class="col-sm-4">
|
% if data['synced_version'] == 1:
|
||||||
<h5>Audio</h5>
|
<tr>
|
||||||
<ul class="list-unstyled">
|
<td>Synced Version</td>
|
||||||
<li>Codec: <strong>${data['audio_codec']}</strong></li>
|
<td>-</td>
|
||||||
<li>Channels: <strong>${data['audio_channels']}</strong></li>
|
<td>yes</td>
|
||||||
</ul>
|
</tr>
|
||||||
</div>
|
% endif
|
||||||
</div>
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
|
<table class="stream-info">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Container
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
${data['stream_container_decision']}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Container</td>
|
||||||
|
<td>${data['stream_container']}</td>
|
||||||
|
<td>${data['container']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
% if data['media_type'] != 'track':
|
||||||
|
<table class="stream-info">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Video
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
${data['stream_video_decision']}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Codec</td>
|
||||||
|
<td>${data['stream_video_codec']}</td>
|
||||||
|
<td>${data['video_codec']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bitrate</td>
|
||||||
|
<td>${data['stream_video_bitrate']} kbps</td>
|
||||||
|
<td>${data['video_bitrate']} kbps</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Width</td>
|
||||||
|
<td>${data['stream_video_width']}</td>
|
||||||
|
<td>${data['video_width']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Height</td>
|
||||||
|
<td>${data['stream_video_height']}</td>
|
||||||
|
<td>${data['video_height']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Framerate</td>
|
||||||
|
<td>${data['stream_video_framerate']}</td>
|
||||||
|
<td>${data['video_framerate']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Aspect Ratio</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td>${data['aspect_ratio']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
% endif
|
||||||
|
<table class="stream-info">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Audio
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
${data['stream_audio_decision']}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Codec</td>
|
||||||
|
<td>${data['stream_audio_codec']}</td>
|
||||||
|
<td>${data['audio_codec']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bitrate</td>
|
||||||
|
<td>${data['stream_audio_bitrate']} kbps</td>
|
||||||
|
<td>${data['audio_bitrate']} kbps</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Channels</td>
|
||||||
|
<td>${data['stream_audio_channels']}</td>
|
||||||
|
<td>${data['audio_channels']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
% if data['subtitles'] == 1:
|
||||||
|
<table class="stream-info">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Subtitles
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
${data['stream_subtitle_decision']}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Codec</td>
|
||||||
|
<td>${data['stream_subtitle_codec']}</td>
|
||||||
|
<td>${data['subtitle_codec']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -872,9 +872,14 @@ class DataFactory(object):
|
||||||
user_cond = 'AND %s.user_id = %s ' % (table, session.get_session_user_id())
|
user_cond = 'AND %s.user_id = %s ' % (table, session.get_session_user_id())
|
||||||
|
|
||||||
if row_id:
|
if row_id:
|
||||||
query = 'SELECT container, bitrate, video_resolution, width, height, aspect_ratio, video_framerate, ' \
|
query = 'SELECT bitrate, video_resolution, optimized_version, optimized_version_profile, synced_version, ' \
|
||||||
'video_codec, audio_codec, audio_channels, video_decision, transcode_video_codec, transcode_height, ' \
|
'container, video_codec, video_Bitrate, video_width, video_height, video_framerate, aspect_ratio, ' \
|
||||||
'transcode_width, audio_decision, transcode_audio_codec, transcode_audio_channels, transcode_container, ' \
|
'audio_codec, audio_bitrate, audio_channels, subtitle_codec, ' \
|
||||||
|
'stream_bitrate, stream_video_resolution, quality_profile, stream_container_decision, stream_container, ' \
|
||||||
|
'stream_video_decision, stream_video_codec, stream_video_bitrate, stream_video_width, stream_video_height, ' \
|
||||||
|
'stream_video_framerate, ' \
|
||||||
|
'stream_audio_decision, stream_audio_codec, stream_audio_bitrate, stream_audio_channels, ' \
|
||||||
|
'subtitles, stream_subtitle_decision, stream_subtitle_codec, ' \
|
||||||
'session_history_metadata.media_type, title, grandparent_title ' \
|
'session_history_metadata.media_type, title, grandparent_title ' \
|
||||||
'FROM session_history_media_info ' \
|
'FROM session_history_media_info ' \
|
||||||
'JOIN session_history ON session_history_media_info.id = session_history.id ' \
|
'JOIN session_history ON session_history_media_info.id = session_history.id ' \
|
||||||
|
@ -882,9 +887,14 @@ class DataFactory(object):
|
||||||
'WHERE session_history_media_info.id = ? %s' % user_cond
|
'WHERE session_history_media_info.id = ? %s' % user_cond
|
||||||
result = monitor_db.select(query, args=[row_id])
|
result = monitor_db.select(query, args=[row_id])
|
||||||
elif session_key:
|
elif session_key:
|
||||||
query = 'SELECT container, bitrate, video_resolution, width, height, aspect_ratio, video_framerate, ' \
|
query = 'SELECT bitrate, video_resolution, optimized_version, optimized_version_profile, synced_version, ' \
|
||||||
'video_codec, audio_codec, audio_channels, video_decision, transcode_video_codec, transcode_height, ' \
|
'container, video_codec, video_Bitrate, video_width, video_height, video_framerate, aspect_ratio, ' \
|
||||||
'transcode_width, audio_decision, transcode_audio_codec, transcode_audio_channels, transcode_container, ' \
|
'audio_codec, audio_bitrate, audio_channels, subtitle_codec, ' \
|
||||||
|
'stream_bitrate, stream_video_resolution, quality_profile, stream_container_decision, stream_container, ' \
|
||||||
|
'stream_video_decision, stream_video_codec, stream_video_bitrate, stream_video_width, stream_video_height, ' \
|
||||||
|
'stream_video_framerate, ' \
|
||||||
|
'stream_audio_decision, stream_audio_codec, stream_audio_bitrate, stream_audio_channels, ' \
|
||||||
|
'subtitles, stream_subtitle_decision, stream_subtitle_codec, ' \
|
||||||
'media_type, title, grandparent_title ' \
|
'media_type, title, grandparent_title ' \
|
||||||
'FROM sessions ' \
|
'FROM sessions ' \
|
||||||
'WHERE session_key = ? %s' % user_cond
|
'WHERE session_key = ? %s' % user_cond
|
||||||
|
@ -895,24 +905,40 @@ class DataFactory(object):
|
||||||
stream_output = {}
|
stream_output = {}
|
||||||
|
|
||||||
for item in result:
|
for item in result:
|
||||||
stream_output = {'container': item['container'],
|
stream_output = {'bitrate': item['bitrate'],
|
||||||
'bitrate': item['bitrate'],
|
|
||||||
'video_resolution': item['video_resolution'],
|
'video_resolution': item['video_resolution'],
|
||||||
'width': item['width'],
|
'optimized_version': item['optimized_version'],
|
||||||
'height': item['height'],
|
'optimized_version_profile': item['optimized_version_profile'],
|
||||||
'aspect_ratio': item['aspect_ratio'],
|
'synced_version': item['synced_version'],
|
||||||
'video_framerate': item['video_framerate'],
|
'container': item['container'],
|
||||||
'video_codec': item['video_codec'],
|
'video_codec': item['video_codec'],
|
||||||
|
'video_bitrate': item['video_bitrate'],
|
||||||
|
'video_width': item['video_width'],
|
||||||
|
'video_height': item['video_height'],
|
||||||
|
'video_framerate': item['video_framerate'],
|
||||||
|
'aspect_ratio': item['aspect_ratio'],
|
||||||
'audio_codec': item['audio_codec'],
|
'audio_codec': item['audio_codec'],
|
||||||
|
'audio_bitrate': item['audio_bitrate'],
|
||||||
'audio_channels': item['audio_channels'],
|
'audio_channels': item['audio_channels'],
|
||||||
'transcode_video_dec': item['video_decision'],
|
'subtitle_codec': item['subtitle_codec'],
|
||||||
'transcode_video_codec': item['transcode_video_codec'],
|
'stream_bitrate': item['stream_bitrate'],
|
||||||
'transcode_height': item['transcode_height'],
|
'stream_video_resolution': item['stream_video_resolution'],
|
||||||
'transcode_width': item['transcode_width'],
|
'quality_profile': item['quality_profile'],
|
||||||
'transcode_audio_dec': item['audio_decision'],
|
'stream_container_decision': item['stream_container_decision'],
|
||||||
'transcode_audio_codec': item['transcode_audio_codec'],
|
'stream_container': item['stream_container'],
|
||||||
'transcode_audio_channels': item['transcode_audio_channels'],
|
'stream_video_decision': item['stream_video_decision'],
|
||||||
'transcode_container': item['transcode_container'],
|
'stream_video_codec': item['stream_video_codec'],
|
||||||
|
'stream_video_bitrate': item['stream_video_bitrate'],
|
||||||
|
'stream_video_width': item['stream_video_width'],
|
||||||
|
'stream_video_height': item['stream_video_height'],
|
||||||
|
'stream_video_framerate': item['stream_video_framerate'],
|
||||||
|
'stream_audio_decision': item['stream_audio_decision'],
|
||||||
|
'stream_audio_codec': item['stream_audio_codec'],
|
||||||
|
'stream_audio_bitrate': item['stream_audio_bitrate'],
|
||||||
|
'stream_audio_channels': item['stream_audio_channels'],
|
||||||
|
'subtitles': item['subtitles'],
|
||||||
|
'stream_subtitle_decision': item['stream_subtitle_decision'],
|
||||||
|
'stream_subtitle_codec': item['stream_subtitle_codec'],
|
||||||
'media_type': item['media_type'],
|
'media_type': item['media_type'],
|
||||||
'title': item['title'],
|
'title': item['title'],
|
||||||
'grandparent_title': item['grandparent_title']
|
'grandparent_title': item['grandparent_title']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue