mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
226 lines
No EOL
12 KiB
HTML
226 lines
No EOL
12 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.html
|
|
Version: 0.1
|
|
Variable names: data [list]
|
|
|
|
data :: Usable parameters
|
|
|
|
data['stream_count'] Returns the current number of active streams
|
|
data['sessions'] Returns an array containing session data
|
|
|
|
data[sessions] :: 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.
|
|
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.
|
|
state Returns the state of the current session. Either 'playing', 'paused' or 'buffering'.
|
|
title Returns the name of the episode, movie or music track.
|
|
player Returns the name of the platform used to play the stream.
|
|
platform Returns the type of platform used to play the stream.
|
|
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:
|
|
% if data['stream_count'] != '0':
|
|
% for a in data['sessions']:
|
|
<div class="instance" id="instance-${a['session_key']}">
|
|
<div class="poster">
|
|
<div class="dashboard-activity-poster-face">
|
|
% if a['type'] == 'movie' and not a['indexes']:
|
|
<img src="pms_image_proxy?img=${a['art']}&width=410&height=230"/>
|
|
% elif a['indexes']:
|
|
<img onload="fadeIn(this)" src="pms_image_proxy?img=${a['bif_thumb']}&width=300&height=169" style="display: none;"/>
|
|
% else:
|
|
% if a['type'] == 'track':
|
|
<div class="dashboard-activity-poster-music-bg" style="background-image: url('pms_image_proxy?img=${a['thumb']}&width=300&height=300');"></div>
|
|
% endif
|
|
% if a['type'] == 'clip':
|
|
<img src="${a['thumb']}"/>
|
|
% else:
|
|
<img src="pms_image_proxy?img=${a['thumb']}&width=410&height=230&fallback=cover"/>
|
|
% endif
|
|
% endif
|
|
<div class="dashboard-activity-poster-info-bar">
|
|
<div class="dashboard-activity-poster-info-text">
|
|
% if a['type'] == 'track':
|
|
Track ${a['media_index']}
|
|
% elif a['type'] == 'episode':
|
|
Season ${a['parent_media_index']}, Episode ${a['media_index']}
|
|
% else:
|
|
${a['title']}
|
|
% endif
|
|
</div>
|
|
<div class="dashboard-activity-poster-info-time">
|
|
<span class="progress_time">${a['progress']}</span>/<span class="progress_time">${a['duration']}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='dashboard-activity-metadata-wrapper'>
|
|
<div class='dashboard-activity-instance-overlay'>
|
|
<div class='dashboard-activity-metadata-progress-minutes'>
|
|
<div class='activity-progress'>
|
|
<div class="bar" style="width: ${a['progress_percent']}%">${a['progress_percent']}%</div>
|
|
</div>
|
|
</div>
|
|
<div class="dashboard-activity-metadata-platform" data-toggle="tooltip" data-placement="right" title data-title="${a['player']}" id="platform-${a['session_key']}">
|
|
</div>
|
|
<div class="dashboard-activity-metadata-user">
|
|
% if a['user_id']:
|
|
<a href="user?user_id=${a['user_id']}">${a['friendly_name']}</a> is ${a['state']}
|
|
% else:
|
|
<a href="user?user=${a['user']}">${a['friendly_name']}</a> is ${a['state']}
|
|
% endif
|
|
</div>
|
|
<div class="dashboard-activity-metadata-title">
|
|
% if a['type'] == 'episode':
|
|
<a href="info?item_id=${a['rating_key']}">${a['grandparent_title']} - ${a['title']}</a>
|
|
% elif a['type'] == 'movie':
|
|
<a href="info?item_id=${a['rating_key']}">${a['title']}</a>
|
|
% elif a['type'] == 'clip':
|
|
${a['title']}
|
|
% elif a['type'] == 'track':
|
|
${a['grandparent_title']} - ${a['title']}
|
|
% else:
|
|
${a['grandparent_title']} - ${a['title']}
|
|
% endif
|
|
</div>
|
|
</div>
|
|
<div id="stream-${a['session_key']}" class="collapse out">
|
|
<div class='dashboard-activity-info-details-overlay'>
|
|
<div class='dashboard-activity-info-details-content'>
|
|
% if a['type'] == 'track':
|
|
Artist: <strong>${a['grandparent_title']}</strong>
|
|
<br>
|
|
Album: <strong>${a['parent_title']}</strong>
|
|
<br>
|
|
% endif
|
|
% if a['state'] == 'playing':
|
|
State: <strong>Playing</strong>
|
|
% elif a['state'] == 'paused':
|
|
State: <strong>Paused</strong>
|
|
% elif a['state'] == 'buffering':
|
|
State: <strong>Buffering</strong>
|
|
% endif
|
|
<br>
|
|
% if a['type'] == 'track':
|
|
% if a['audio_decision'] == 'direct play':
|
|
Stream: <strong>Direct Play</strong>
|
|
% else:
|
|
Stream: <strong>Transcoding</strong>
|
|
% endif
|
|
<br/>
|
|
% if a['audio_decision'] != 'direct play':
|
|
Audio: <strong>${a['transcode_audio_codec']} (${a['transcode_audio_channels']}ch)</strong>
|
|
% elif a['audio_decision'] == 'direct play':
|
|
Audio: <strong>${a['audio_codec']} (${a['audio_channels']}ch)</strong>
|
|
% endif
|
|
% elif a['type'] == 'episode' or a['type'] == 'movie' or a['type'] == 'clip':
|
|
% if a['video_decision'] == 'direct play':
|
|
Stream: <strong>Direct Play</strong>
|
|
% else:
|
|
Stream: <strong>Transcoding</strong>
|
|
% endif
|
|
<br/>
|
|
% if a['video_decision'] != 'direct play':
|
|
Video: <strong>${a['video_decision']} (${a['transcode_video_codec']})
|
|
(${a['transcode_width']}x${a['transcode_height']})</strong>
|
|
% elif a['audio_decision'] == 'direct play':
|
|
Video: <strong>${a['video_decision']} (${a['video_codec']})
|
|
(${a['width']}x${a['height']})</strong>
|
|
% endif
|
|
<br/>
|
|
% if a['audio_decision'] != 'direct play':
|
|
Audio: <strong>${a['audio_decision']} ${a['transcode_audio_codec']} (${a['transcode_audio_channels']}ch)</strong>
|
|
% elif a['audio_decision'] == 'direct play':
|
|
Audio: <strong>${a['audio_codec']} (${a['audio_channels']}ch)</strong>
|
|
% endif
|
|
% endif
|
|
<br>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="dashboard-activity-button-info">
|
|
<button type="button" class="btn btn-activity-info btn-sm" data-toggle="collapse" data-target="#stream-${a['session_key']}">
|
|
<i class='fa fa-info-circle'></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$("#platform-${a['session_key']}").html("<img src='" + getPlatformImagePath('${a['platform']}') + "'>");
|
|
</script>
|
|
|
|
% endfor
|
|
<script>
|
|
// When using bif indexes make the image transition a little smoother.
|
|
function fadeIn(obj) {
|
|
$(obj).fadeIn(450);
|
|
}
|
|
// Convert timestamps to readable times
|
|
$('.progress_time').each(function(index) {
|
|
$(this).html(millisecondsToMinutes($(this).text(), false));
|
|
});
|
|
|
|
// Hide the info bar on page load
|
|
$('.dashboard-activity-poster-info-bar').hide();
|
|
|
|
// When mouse over the activity pane, show an info bar with extra info.
|
|
$('.dashboard-activity-poster-face').mouseenter(function() {
|
|
$('.dashboard-activity-poster-info-bar', this).slideDown('fast');
|
|
});
|
|
$('.dashboard-activity-poster-face').mouseleave(function() {
|
|
$('.dashboard-activity-poster-info-bar', this).slideUp('fast');
|
|
});
|
|
|
|
// Tooltips
|
|
$('.dashboard-activity-metadata-platform').each(function() {
|
|
$(this).tooltip();
|
|
});
|
|
</script>
|
|
% else:
|
|
<div class="text-muted">Nothing is currently being watched.</div><br>
|
|
% endif
|
|
% else:
|
|
<div class="text-muted">There was an error communicating with your Plex Server. Please check your <a
|
|
href="settings">settings</a>.
|
|
</div><br>
|
|
% endif |