mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
311 lines
No EOL
20 KiB
HTML
311 lines
No EOL
20 KiB
HTML
<%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: current_activity_instance.html
|
|
Version: 0.1
|
|
Variable names: data {dict}
|
|
|
|
data :: Usable parameters
|
|
|
|
== Global keys ==
|
|
session_key Returns a unique session id for the active stream
|
|
rating_key Returns the unique identifier for the media item.
|
|
media_index Returns the index of the media item.
|
|
parent_media_index Returns the index of the media item's parent.
|
|
media_type Returns the type of session. Either 'track', 'episode' or 'movie'.
|
|
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
|
bif_thumb Returns the location of the item's bif thumbnail. Use with pms_image_proxy.
|
|
art Returns the location of the item's artwork
|
|
progress_percent Returns the current progress of the item. 0 to 100.
|
|
user Returns the name of the user owning the session.
|
|
user_id Returns the Plex user id if available.
|
|
machine_id Returns the machine id of the players being used.
|
|
friendly_name Returns the friendlly name of the user owning the session.
|
|
user_thumb Returns the profile picture of the user owning the session.
|
|
state Returns the state of the current session. Either 'playing', 'paused' or 'buffering'.
|
|
title Returns the name of the episode, movie or music track.
|
|
year Returns the year of the episode, movie, or clip.
|
|
ip_address Returns the ip address of the stream.
|
|
player Returns the name of the platform used to play the stream.
|
|
platform Returns the type of platform used to play the stream.
|
|
throttled Returns true if the transcode session is throttled.
|
|
transcode_progress Returns the current transcode progress of the item. 0 to 100.
|
|
transcode_speed Returns the current transcode speed of the item.
|
|
audio_decision Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
|
audio_codec Returns the name of the audio codec.
|
|
audio_channels Returns the number of audio channels.
|
|
grandparent_title Returns the title of the item's grandparent.
|
|
parent_title Returns the title of the item's parent.
|
|
video_decision Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
|
video_codec Returns the name of the video codec.
|
|
height Returns the value of the video height.
|
|
width Returns the value of the video width.
|
|
container Returns the value of the media container.
|
|
bitrate Returns the value of the media bitrate.
|
|
video_resolution Returns the value of the video resolution.
|
|
video_framerate Returns the value of the video framerate.
|
|
video_aspect_ratio Returns the value of the video aspect ratio.
|
|
transcode_audio_channels Returns the amount of audio channels if there is a transcode session.
|
|
transcode_audio_codec Returns the name of the audio codec if there is a transcode session.
|
|
transcode_video_codec Returns the name of the video codec if there is a transcode session.
|
|
transcode_width Returns the video width if there is a transcode session.
|
|
transcode_height Returns the video height if there is a transcode session.
|
|
transcode_container Returns the value of media container if there is a transcode session.
|
|
transcode_protocol Returns the value of media protocol if there is a transcode session.
|
|
indexes Returns true if the media has media indexes and are enabled
|
|
|
|
DOCUMENTATION :: END
|
|
</%doc>
|
|
|
|
% if data is not None:
|
|
<%
|
|
from plexpy import helpers
|
|
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
|
%>
|
|
<div class="dashboard-instance" id="instance-${data['session_key']}" data-id="${data['session_key']}">
|
|
<div class="dashboard-hover-container">
|
|
% if (data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track') and data['rating_key']:
|
|
<a href="info?rating_key=${data['rating_key']}">
|
|
% else:
|
|
<a href="#">
|
|
% endif
|
|
<div class="dashboard-activity-poster">
|
|
% if not data['art'].startswith('interfaces') or not data['thumb'].startswith('interfaces'):
|
|
% if (data['media_type'] == 'movie' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
|
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
|
% elif (data['media_type'] == 'episode' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
|
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
|
% elif data['indexes']:
|
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['bif_thumb']}&width=500&height=280&fallback=art); display: none;"></div>
|
|
% else:
|
|
% if data['media_type'] == 'track':
|
|
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
|
% elif data['media_type'] == 'clip':
|
|
% if data['art'].startswith('http'):
|
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
|
|
% elif data['thumb'].startswith('http'):
|
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
|
% else:
|
|
% if data['art']:
|
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
|
% else:
|
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=art);"></div>
|
|
% endif
|
|
% endif
|
|
% elif data['media_type'] == 'photo':
|
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);"></div>
|
|
% else:
|
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
|
% endif
|
|
% endif
|
|
% else:
|
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
|
|
% endif
|
|
<div class="dashboard-activity-button-info">
|
|
<button type="button" class="btn btn-activity-info btn-lg" data-target="#stream-${data['session_key']}">
|
|
<i class="fa fa-info-circle"></i>
|
|
</button>
|
|
</div>
|
|
<div id="stream-${data['session_key']}" class="dashboard-activity-info-details-overlay">
|
|
<div class="dashboard-activity-info-details-content">
|
|
<div id="platform-${data['session_key']}" title="${data['platform']}">
|
|
<script>
|
|
$("#platform-${data['session_key']}").html("<div class='dashboard-activity-info-platform-box' style='background-image: url(" + getPlatformImagePath('${data['platform']}') + ");'>");
|
|
</script>
|
|
</div>
|
|
<div class="dashboard-activity-info-platform">
|
|
<strong>${data['player']}</strong><br />
|
|
<span id="overlay-play-state-${data['session_key']}">
|
|
% if data['state'] == 'playing':
|
|
State <strong>Playing</strong>
|
|
% elif data['state'] == 'paused':
|
|
State <strong>Paused</strong>
|
|
% elif data['state'] == 'buffering':
|
|
State <strong>Buffering</strong>
|
|
% endif
|
|
</span>
|
|
</div>
|
|
% if data['media_type'] == 'track':
|
|
% if data['audio_decision'] == 'direct play':
|
|
Stream <strong>Direct Play</strong>
|
|
% elif data['audio_decision'] == 'copy':
|
|
Stream <strong>Direct Stream</strong>
|
|
% else:
|
|
Stream <strong>
|
|
Transcoding
|
|
<span id="transcode-state-${data['session_key']}">
|
|
(Speed: ${data['transcode_speed']})
|
|
% if data['throttled'] == '1':
|
|
(Throttled)
|
|
% endif
|
|
</span>
|
|
</strong>
|
|
% endif
|
|
<br />
|
|
% if data['audio_decision'] == 'direct play':
|
|
Audio <strong>Direct Play (${data['audio_codec']}) (${data['audio_channels']}ch)</strong>
|
|
% elif data['audio_decision'] == 'copy':
|
|
Audio <strong>Direct Stream (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
% elif data['audio_decision'] == 'transcode':
|
|
Audio <strong>Transcode (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
% endif
|
|
% elif data['media_type'] == 'episode' or data['media_type'] == 'movie' or data['media_type'] == 'clip':
|
|
% if data['video_decision'] == 'direct play' and data['audio_decision'] == 'direct play':
|
|
Stream <strong>Direct Play</strong>
|
|
% elif data['video_decision'] == 'copy' and data['audio_decision'] == 'copy':
|
|
Stream <strong>Direct Stream</strong>
|
|
% else:
|
|
Stream <strong>
|
|
Transcoding
|
|
<span id="transcode-state-${data['session_key']}">
|
|
(Speed: ${data['transcode_speed']})
|
|
% if data['throttled'] == '1':
|
|
(Throttled)
|
|
% endif
|
|
</span>
|
|
</strong>
|
|
% endif
|
|
<br />
|
|
% if data['video_decision'] == 'direct play':
|
|
Video <strong>Direct Play (${data['video_codec']}) (${data['width']}x${data['height']})</strong>
|
|
% elif data['video_decision'] == 'copy':
|
|
Video <strong>Direct Stream (${data['transcode_video_codec']}) (${data['width']}x${data['height']})</strong>
|
|
% elif data['video_decision'] == 'transcode':
|
|
Video <strong>Transcode (${data['transcode_video_codec']}) (${data['transcode_width']}x${data['transcode_height']})</strong>
|
|
% endif
|
|
<br />
|
|
% if data['audio_decision'] == 'direct play':
|
|
Audio <strong>Direct Play (${data['audio_codec']}) (${data['audio_channels']}ch)</strong>
|
|
% elif data['audio_decision'] == 'copy':
|
|
Audio <strong>Direct Stream (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
% elif data['audio_decision'] == 'transcode':
|
|
Audio <strong>Transcode (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
% endif
|
|
% elif data['media_type'] == 'photo':
|
|
% if data['video_decision'] == 'direct play':
|
|
Stream <strong>Direct Play</strong>
|
|
% elif data['video_decision'] == 'copy':
|
|
Stream <strong>Direct Stream</strong>
|
|
% else:
|
|
Stream <strong>
|
|
<span id="transcode-state-${data['session_key']}">
|
|
(Speed: ${data['transcode_speed']})
|
|
% if data['throttled'] == '1':
|
|
(Throttled)
|
|
% endif
|
|
</span>
|
|
</strong>
|
|
% endif
|
|
% endif
|
|
<br>
|
|
</div>
|
|
</div>
|
|
% if data['media_type'] != 'photo':
|
|
<div class="dashboard-activity-poster-info-bar">
|
|
<div class="dashboard-activity-poster-info-ip-address">
|
|
% if data['ip_address']:
|
|
<span>IP: ${data['ip_address']}</span>
|
|
% else:
|
|
<span>IP: N/A</span>
|
|
% endif
|
|
<br />
|
|
ETA:
|
|
<span id="stream-eta-${data['session_key']}">
|
|
<script>
|
|
$("#stream-eta-${data['session_key']}").html(moment().add(parseInt("${data['duration']}") - parseInt("${data['view_offset']}"), 'milliseconds').format(time_format));
|
|
</script>
|
|
</span>
|
|
</div>
|
|
<div class="dashboard-activity-poster-info-time">
|
|
<span class="progress_time" id="stream-view-offset-${data['session_key']}">
|
|
<script>
|
|
$("#stream-view-offset-${data['session_key']}").html(millisecondsToMinutes(parseInt("${data['view_offset']}"), false));
|
|
</script>
|
|
</span>/<span class="progress_time" id="stream-duration-${data['session_key']}">
|
|
<script>
|
|
$("#stream-duration-${data['session_key']}").html(millisecondsToMinutes(parseInt("${data['duration']}"), false));
|
|
</script>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
% endif
|
|
</div>
|
|
% if (data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track') and data['rating_key']:
|
|
</a>
|
|
% else:
|
|
</a>
|
|
% endif
|
|
<div class="dashboard-activity-progress">
|
|
<div class="dashboard-activity-progress-bar">
|
|
<div id="bufferbar-${data['session_key']}" class="bufferbar" style="width: ${data['transcode_progress']}%" data-toggle="tooltip" title="Transcoder Progress">${data['transcode_progress']}%</div>
|
|
<div id="bar-${data['session_key']}" class="bar" style="width: ${data['progress_percent']}%" data-toggle="tooltip" title="Stream Progress">${data['progress_percent']}%</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="dashboard-activity-metadata-wrapper">
|
|
% if data['user_id']:
|
|
<a href="user?user_id=${data['user_id']}">
|
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${data['user_thumb']});"></div>
|
|
</a>
|
|
% else:
|
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${data['user_thumb']});"></div>
|
|
% endif
|
|
<div class="dashboard-activity-metadata-title">
|
|
<span id="play-state-${data['session_key']}">
|
|
% if data['state'] == 'playing':
|
|
<i class="fa fa-fw fa-play"></i>
|
|
% elif data['state'] == 'paused':
|
|
<i class="fa fa-fw fa-pause"></i>
|
|
% elif data['state'] == 'buffering':
|
|
<i class="fa fa-fw fa-spinner"></i>
|
|
% endif
|
|
</span>
|
|
% if data['rating_key']:
|
|
% if data['media_type'] == 'episode':
|
|
<a href="info?rating_key=${data['grandparent_rating_key']}" title="${data['grandparent_title']}">${data['grandparent_title']}</a>
|
|
- <a href="info?rating_key=${data['rating_key']}" title="${data['title']}">${data['title']}</a>
|
|
% elif data['media_type'] == 'movie':
|
|
<a href="info?rating_key=${data['rating_key']}" title="${data['title']}">${data['title']}</a>
|
|
% elif data['media_type'] == 'clip':
|
|
<span title="${data['title']}">${data['title']}</span>
|
|
% elif data['media_type'] == 'track':
|
|
<a href="info?rating_key=${data['grandparent_rating_key']}" title="${data['grandparent_title']}">${data['grandparent_title']}</a>
|
|
- <a href="info?rating_key=${data['rating_key']}" title="${data['title']}">${data['title']}</a>
|
|
% elif data['media_type'] == 'photo':
|
|
<span title="${data['parent_title']}">${data['parent_title']}</span>
|
|
% else:
|
|
<span title="${data['title']}">${data['title']}</span>
|
|
% endif
|
|
% else:
|
|
${data['title']}
|
|
% endif
|
|
</div>
|
|
<div class="dashboard-activity-metadata-subtitle">
|
|
% if data['rating_key']:
|
|
% if data['media_type'] == 'episode':
|
|
<a href="info?rating_key=${data['parent_rating_key']}" title="Season ${data['parent_media_index']}" class="text-muted">S${data['parent_media_index']}</a>
|
|
· <a href="info?rating_key=${data['rating_key']}" title="Episode ${data['media_index']}" class="text-muted">E${data['media_index']}</a>
|
|
% elif data['media_type'] == 'movie':
|
|
<span title="${data['year']}">${data['year']}</span>
|
|
% elif data['media_type'] == 'track':
|
|
<a href="info?rating_key=${data['parent_rating_key']}" title="${data['parent_title']}">${data['parent_title']}</a>
|
|
% elif data['media_type'] == 'photo':
|
|
<span title="${data['title']}">${data['title']}</span>
|
|
% else:
|
|
<span title="${data['year']}">${data['year']}</span>
|
|
% endif
|
|
% endif
|
|
</div>
|
|
<div class="dashboard-activity-metadata-user">
|
|
% if data['user_id']:
|
|
<a href="user?user_id=${data['user_id']}" title="${data['friendly_name']}">${data['friendly_name']}</a>
|
|
% else:
|
|
${data['friendly_name']}
|
|
% endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
% endif |