mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Start front-end clean up and documentation.
This commit is contained in:
parent
54ee7f4c0d
commit
c0f487940f
19 changed files with 1320 additions and 896 deletions
|
@ -1,99 +1,150 @@
|
|||
% if activity is not None:
|
||||
% if activity['stream_count'] != '0':
|
||||
% for a in activity['sessions']:
|
||||
<div class="instance" id="instance-${a['sessionKey']}">
|
||||
<div class="poster">
|
||||
% if a['type'] == 'track-to-do':
|
||||
<div class="art-music-face" style="background-image:url(pms_image_proxy?img=${a['thumb']}&width=300&height=300)"></div>
|
||||
% elif a['type'] == 'movie':
|
||||
<div class="dashboard-activity-poster-face">
|
||||
<img src="pms_image_proxy?img=${a['art']}&width=300&height=169"/> <!-- media artwork -->
|
||||
</div>
|
||||
% else:
|
||||
<div class="dashboard-activity-poster-face">
|
||||
<img src="pms_image_proxy?img=${a['thumb']}&width=300&height=169"/> <!-- media artwork -->
|
||||
</div>
|
||||
% endif
|
||||
<div class='dashboard-activity-metadata-wrapper'>
|
||||
<div class='dashboard-activity-instance-overlay'>
|
||||
<div class='dashboard-activity-metadata-progress-minutes'>
|
||||
<div class='progress progress-warning'>
|
||||
<div class="bar" style="width: ${a['progressPercent']}%">${a['progressPercent']}%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-platform" id="platform-${a['sessionKey']}">
|
||||
<!-- <img src="interfaces/default/images/platforms/roku.png"> platform image -->
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-user">
|
||||
<a href="user?user=${a['user']}">${a['user']}</a> is ${a['state']}
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-title">
|
||||
% if a['type'] == 'episode':
|
||||
<a href="info?rating_key=${a['ratingKey']}">${a['grandparentTitle']} - ${a['title']}</a>
|
||||
% elif a['type'] == 'movie':
|
||||
<a href="info?rating_key=${a['ratingKey']}">${a['title']}</a>
|
||||
% elif a['type'] == 'track':
|
||||
${a['artist']} - ${a['track']}
|
||||
% else:
|
||||
${a['grandparentTitle']} - ${a['title']}
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
<div id="stream-${a['sessionKey']}" class="collapse out">
|
||||
<div class='dashboard-activity-info-details-overlay'>
|
||||
<div class='dashboard-activity-info-details-content'>
|
||||
% if a['type'] == 'track':
|
||||
Artist: <strong>${a['artist']}</strong>
|
||||
<br>
|
||||
Album: <strong>${a['album']}</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['audioDecision'] == 'direct play':
|
||||
Stream: <strong>Direct Play</strong>
|
||||
% else:
|
||||
Stream: <strong>Transcoding</strong>
|
||||
% endif
|
||||
<br/>
|
||||
Audio: <strong>${a['audioCodec']} (${a['audioChannels']}ch)</strong>
|
||||
% elif a['type'] == 'episode' or a['type'] == 'movie':
|
||||
% if a['videoDecision'] == 'direct play':
|
||||
Stream: <strong>Direct Play</strong>
|
||||
% else:
|
||||
Stream: <strong>Transcoding</strong>
|
||||
% endif
|
||||
<br/>
|
||||
Video: <strong>${a['videoDecision']} (${a['videoCodec']}) (${a['width']}x${a['height']})</strong>
|
||||
<br/>
|
||||
Audio: <strong>${a['audioDecision']} (${a['audioCodec']}) (${a['audioChannels']}ch)</strong>
|
||||
% endif
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%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 ==
|
||||
sessionKey Returns a unique session id for the active stream
|
||||
ratingKey Returns the unique identifier for the media item.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
audioDecision Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
||||
audioCodec Returns the name of the audio codec.
|
||||
audioChannels Returns the number of audio channels.
|
||||
|
||||
== Only if 'type' is 'episode' ==
|
||||
grandparentTitle Returns the name of the TV Show.
|
||||
|
||||
== Only if 'type' is 'track' ==
|
||||
artist Returns the name of the artist of a music track.
|
||||
album Returns the name of the album of the music track.
|
||||
|
||||
== Only if 'type' is 'episode' or 'movie' ==
|
||||
videoDecision Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
||||
videoCodec Returns the name of the video codec.
|
||||
height Returns the value of the video height.
|
||||
width Returns the value of the video width.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data is not None:
|
||||
% if data['stream_count'] != '0':
|
||||
% for a in data['sessions']:
|
||||
<div class="instance" id="instance-${a['sessionKey']}">
|
||||
<div class="poster">
|
||||
% if a['type'] == 'track-to-do':
|
||||
<div class="art-music-face"
|
||||
style="background-image:url(pms_image_proxy?img=${a['thumb']}&width=300&height=300)"></div>
|
||||
% elif a['type'] == 'movie':
|
||||
<div class="dashboard-activity-poster-face">
|
||||
<img src="pms_image_proxy?img=${a['art']}&width=300&height=169"/> <!-- media artwork -->
|
||||
</div>
|
||||
% else:
|
||||
<div class="dashboard-activity-poster-face">
|
||||
<img src="pms_image_proxy?img=${a['thumb']}&width=300&height=169"/> <!-- media artwork -->
|
||||
</div>
|
||||
% endif
|
||||
<div class='dashboard-activity-metadata-wrapper'>
|
||||
<div class='dashboard-activity-instance-overlay'>
|
||||
<div class='dashboard-activity-metadata-progress-minutes'>
|
||||
<div class='progress progress-warning'>
|
||||
<div class="bar" style="width: ${a['progressPercent']}%">${a['progressPercent']}%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-activity-button-info">
|
||||
<button type="button" class="btn btn-warning" data-toggle="collapse" data-target="#stream-${a['sessionKey']}">
|
||||
<i class='icon-info-sign icon-white'></i>
|
||||
</button>
|
||||
<div class="dashboard-activity-metadata-platform" id="platform-${a['sessionKey']}">
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-user">
|
||||
<a href="user?user=${a['user']}">${a['user']}</a> is ${a['state']}
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-title">
|
||||
% if a['type'] == 'episode':
|
||||
<a href="info?rating_key=${a['ratingKey']}">${a['grandparentTitle']} - ${a['title']}</a>
|
||||
% elif a['type'] == 'movie':
|
||||
<a href="info?rating_key=${a['ratingKey']}">${a['title']}</a>
|
||||
% elif a['type'] == 'track':
|
||||
${a['artist']} - ${a['track']}
|
||||
% else:
|
||||
${a['grandparentTitle']} - ${a['title']}
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#platform-${a['sessionKey']}").html("<img src='" + getPlatformImagePath('${a['player']}') + "'>");
|
||||
</script>
|
||||
% endfor
|
||||
% else:
|
||||
<div class="muted">Nothing is currently being watched.</div><br>
|
||||
% endif
|
||||
<div id="stream-${a['sessionKey']}" class="collapse out">
|
||||
<div class='dashboard-activity-info-details-overlay'>
|
||||
<div class='dashboard-activity-info-details-content'>
|
||||
% if a['type'] == 'track':
|
||||
Artist: <strong>${a['artist']}</strong>
|
||||
<br>
|
||||
Album: <strong>${a['album']}</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['audioDecision'] == 'direct play':
|
||||
Stream: <strong>Direct Play</strong>
|
||||
% else:
|
||||
Stream: <strong>Transcoding</strong>
|
||||
% endif
|
||||
<br/>
|
||||
Audio: <strong>${a['audioCodec']} (${a['audioChannels']}ch)</strong>
|
||||
% elif a['type'] == 'episode' or a['type'] == 'movie':
|
||||
% if a['videoDecision'] == 'direct play':
|
||||
Stream: <strong>Direct Play</strong>
|
||||
% else:
|
||||
Stream: <strong>Transcoding</strong>
|
||||
% endif
|
||||
<br/>
|
||||
Video: <strong>${a['videoDecision']} (${a['videoCodec']})
|
||||
(${a['width']}x${a['height']})</strong>
|
||||
<br/>
|
||||
Audio: <strong>${a['audioDecision']} (${a['audioCodec']}) (${a['audioChannels']}ch)</strong>
|
||||
% endif
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-activity-button-info">
|
||||
<button type="button" class="btn btn-warning" data-toggle="collapse" data-target="#stream-${a['sessionKey']}">
|
||||
<i class='icon-info-sign icon-white'></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#platform-${a['sessionKey']}").html("<img src='" + getPlatformImagePath('${a['player']}') + "'>");
|
||||
|
||||
</script>
|
||||
% endfor
|
||||
% else:
|
||||
<div class="muted">There was an error communicating with your Plex Server. Please check your <a href="config">settings</a>.</div><br>
|
||||
<div class="muted">Nothing is currently being watched.</div><br>
|
||||
% endif
|
||||
% else:
|
||||
<div class="muted">There was an error communicating with your Plex Server. Please check your <a
|
||||
href="config">settings</a>.
|
||||
</div><br>
|
||||
% endif
|
Loading…
Add table
Add a link
Reference in a new issue