mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Fix handling of clips in activity pane.
Start standardising variable names in templates.
This commit is contained in:
parent
b4f1bddc02
commit
c770c90d76
7 changed files with 188 additions and 124 deletions
|
@ -15,8 +15,8 @@ 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.
|
||||
session_key Returns a unique session id for the active stream
|
||||
rating_key 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
|
||||
|
@ -26,15 +26,13 @@ friendly_name Returns the friendlly name of the user owning the sessio
|
|||
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.
|
||||
grandparentTitle Returns the title of the item's grandparent.
|
||||
parentTitle Returns the title of the item's parent.
|
||||
|
||||
== 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.
|
||||
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.
|
||||
indexes Returns true if the media has media indexes and are enabled
|
||||
|
@ -45,7 +43,7 @@ DOCUMENTATION :: END
|
|||
% if data is not None:
|
||||
% if data['stream_count'] != '0':
|
||||
% for a in data['sessions']:
|
||||
<div class="instance" id="instance-${a['sessionKey']}">
|
||||
<div class="instance" id="instance-${a['session_key']}">
|
||||
<div class="poster">
|
||||
% if a['type'] == 'movie' and not a['indexes']:
|
||||
<div class="dashboard-activity-poster-face">
|
||||
|
@ -64,33 +62,35 @@ DOCUMENTATION :: END
|
|||
<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 class="bar" style="width: ${a['progress_percent']}%">${a['progress_percent']}%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-platform" id="platform-${a['sessionKey']}">
|
||||
<div class="dashboard-activity-metadata-platform" id="platform-${a['session_key']}">
|
||||
</div>
|
||||
<div class="dashboard-activity-metadata-user">
|
||||
<a href="user?user=${a['user']}">${a['friendly_name']}</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>
|
||||
<a href="info?rating_key=${a['rating_key']}">${a['grandparent_title']} - ${a['title']}</a>
|
||||
% elif a['type'] == 'movie':
|
||||
<a href="info?rating_key=${a['ratingKey']}">${a['title']}</a>
|
||||
<a href="info?rating_key=${a['rating_key']}">${a['title']}</a>
|
||||
% elif a['type'] == 'clip':
|
||||
${a['title']}
|
||||
% elif a['type'] == 'track':
|
||||
${a['grandparentTitle']} - ${a['title']}
|
||||
${a['grandparent_title']} - ${a['title']}
|
||||
% else:
|
||||
${a['grandparentTitle']} - ${a['title']}
|
||||
${a['grandparent_title']} - ${a['title']}
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
<div id="stream-${a['sessionKey']}" class="collapse out">
|
||||
<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['grandparentTitle']}</strong>
|
||||
Artist: <strong>${a['grandparent_title']}</strong>
|
||||
<br>
|
||||
Album: <strong>${a['parentTitle']}</strong>
|
||||
Album: <strong>${a['parent_title']}</strong>
|
||||
<br>
|
||||
% endif
|
||||
% if a['state'] == 'playing':
|
||||
|
@ -102,24 +102,24 @@ DOCUMENTATION :: END
|
|||
% endif
|
||||
<br>
|
||||
% if a['type'] == 'track':
|
||||
% if a['audioDecision'] == 'direct play':
|
||||
% if a['audio_decision'] == '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':
|
||||
Audio: <strong>${a['audio_codec']} (${a['audio_channels']}ch)</strong>
|
||||
% 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/>
|
||||
Video: <strong>${a['videoDecision']} (${a['videoCodec']})
|
||||
Video: <strong>${a['video_decision']} (${a['video_codec']})
|
||||
(${a['width']}x${a['height']})</strong>
|
||||
<br/>
|
||||
Audio: <strong>${a['audioDecision']} (${a['audioCodec']}) (${a['audioChannels']}ch)</strong>
|
||||
Audio: <strong>${a['audio_decision']} (${a['audio_codec']}) (${a['audio_channels']}ch)</strong>
|
||||
% endif
|
||||
<br>
|
||||
</div>
|
||||
|
@ -128,13 +128,13 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
</div>
|
||||
<div class="dashboard-activity-button-info">
|
||||
<button type="button" class="btn btn-warning" data-toggle="collapse" data-target="#stream-${a['sessionKey']}">
|
||||
<button type="button" class="btn btn-warning" data-toggle="collapse" data-target="#stream-${a['session_key']}">
|
||||
<i class='icon-info-sign icon-white'></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#platform-${a['sessionKey']}").html("<img src='" + getPlatformImagePath('${a['player']}') + "'>");
|
||||
$("#platform-${a['session_key']}").html("<img src='" + getPlatformImagePath('${a['player']}') + "'>");
|
||||
|
||||
</script>
|
||||
% endfor
|
||||
|
|
|
@ -17,7 +17,7 @@ data[array_index]['rows'] :: Usable parameters
|
|||
== Only if 'stat_id' is 'top_tv' or 'popular_tv' ==
|
||||
grandparent_thumb Returns location of the item's thumbnail. Use with pms_image_proxy.
|
||||
rating_key Returns the unique identifier for the media item.
|
||||
orig_title Returns the title for the associated stat.
|
||||
title Returns the title for the associated stat.
|
||||
|
||||
== Only if 'stat_id' is 'top_tv' or 'top_user' or 'top_platform' ==
|
||||
total_plays Returns the count for the associated stat.
|
||||
|
@ -58,7 +58,7 @@ DOCUMENTATION :: END
|
|||
<div class="home-platforms-instance-name">
|
||||
<h4>Most Watched TV</h4>
|
||||
<a href="info?rating_key=${a['rows'][0]['rating_key']}">
|
||||
<h5>${a['rows'][0]['orig_title']}</h5>
|
||||
<h5>${a['rows'][0]['title']}</h5>
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
|
@ -85,7 +85,7 @@ DOCUMENTATION :: END
|
|||
<div class="home-platforms-instance-name">
|
||||
<h4>Most Popular TV</h4>
|
||||
<a href="info?rating_key=${a['rows'][0]['rating_key']}">
|
||||
<h5>${a['rows'][0]['orig_title']}</h5>
|
||||
<h5>${a['rows'][0]['title']}</h5>
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
|
|
|
@ -7,42 +7,28 @@ Filename: info.html
|
|||
Version: 0.1
|
||||
Variable names: data [list]
|
||||
|
||||
data :: Usable parameters
|
||||
data :: Usable parameters (if not applicable for media type, blank value will be returned)
|
||||
|
||||
== Global keys ==
|
||||
ratingKey Returns the unique identifier for the media item.
|
||||
rating_key Returns the unique identifier for the media item.
|
||||
type Returns the type of media. Either 'movie', 'episode' or 'show' or 'season'.
|
||||
art Returns the location of the item's artwork
|
||||
title Returns the name of the episode, show, season or movie.
|
||||
duration Returns the standard runtime of the media.
|
||||
contentRating Returns the age rating for the media.
|
||||
content_rating Returns the age rating for the media.
|
||||
summary Returns a brief description of the media plot.
|
||||
|
||||
== Only if 'type' is 'episode' ==
|
||||
grandparentTitle Returns the name of the TV show.
|
||||
parentIndex Returns the season number of the TV show.
|
||||
grandparent_title Returns the name of the TV show.
|
||||
parent_index Returns the season number of the TV show.
|
||||
index Returns the episode number.
|
||||
parentThumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
parent_thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
writers Returns an array of writers.
|
||||
|
||||
== Only if 'type' is 'movie' or 'season' or 'show' ==
|
||||
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
|
||||
== Only if 'type' is 'season' ==
|
||||
parentTitle Returns the name of the TV show.
|
||||
|
||||
== Only if 'type' is 'movie' ==
|
||||
parent_title Returns the name of the TV show.
|
||||
rating Returns the 5 star rating value for the movie. Between 1 and 5.
|
||||
year Returns the release year of the movie.
|
||||
|
||||
== Only if 'type' is 'movie' or 'show' ==
|
||||
genres Returns an array of genres.
|
||||
actors Returns an array of actors.
|
||||
|
||||
== Only if 'type' is 'episode' or 'movie' ==
|
||||
directors Returns an array of directors.
|
||||
|
||||
== Only if 'type' is 'show' or 'season' ==
|
||||
studio Returns the name of the studio.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
|
@ -72,7 +58,7 @@ from plexpy import helpers
|
|||
<div class="span9">
|
||||
<div class="summary-content-poster hidden-phone hidden-tablet">
|
||||
% if data['type'] == 'episode':
|
||||
<img src="pms_image_proxy?img=${data['parentThumb']}&width=256&height=352">
|
||||
<img src="pms_image_proxy?img=${data['parent_thumb']}&width=256&height=352">
|
||||
% else:
|
||||
<img src="pms_image_proxy?img=${data['thumb']}&width=256&height=352">
|
||||
% endif
|
||||
|
@ -82,9 +68,9 @@ from plexpy import helpers
|
|||
% if data['type'] == 'movie':
|
||||
<h1>${data['title']} (${data['year']})</h1>
|
||||
% elif data['type'] == 'season':
|
||||
<h1>${data['parentTitle']} (${data['title']})</h1>
|
||||
<h1>${data['parent_title']} (${data['title']})</h1>
|
||||
% elif data['type'] == 'episode':
|
||||
<h1>${data['grandparentTitle']} (Season ${data['parentIndex']}, Episode
|
||||
<h1>${data['grandparent_title']} (Season ${data['parent_index']}, Episode
|
||||
${data['index']}) "${data['title']}"</h1>
|
||||
% else:
|
||||
<h1>${data['title']}</h1>
|
||||
|
@ -110,7 +96,7 @@ from plexpy import helpers
|
|||
Runtime <strong> ${data['duration']} mins</strong>
|
||||
</div>
|
||||
<div class="summary-content-content-rating">
|
||||
Rated <strong> ${data['contentRating']} </strong>
|
||||
Rated <strong> ${data['content_rating']} </strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-content-summary">
|
||||
|
@ -198,7 +184,7 @@ from plexpy import helpers
|
|||
<th class="desktop" align='left' id="stopped">Stopped</th>
|
||||
<th class="desktop" align='left' id="duration">Duration</th>
|
||||
<th class="desktop" align='left' id="percent_complete">Completed</th>
|
||||
<th class="never" align='left' id="rating_key">RatingKey</th>
|
||||
<th class="never" align='left' id="rating_key">rating_key</th>
|
||||
<th class="never" align='left' id="xml"></th>
|
||||
<th class="never" align='left' id="user"></th>
|
||||
</tr>
|
||||
|
@ -258,7 +244,7 @@ from plexpy import helpers
|
|||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
"data": function(d) {
|
||||
d.rating_key = ${data['ratingKey']};
|
||||
d.rating_key = ${data['rating_key']};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,7 +262,7 @@ from plexpy import helpers
|
|||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
"data": function(d) {
|
||||
d.grandparent_rating_key = ${data['ratingKey']};
|
||||
d.grandparent_rating_key = ${data['rating_key']};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,7 +278,7 @@ from plexpy import helpers
|
|||
url: 'get_children',
|
||||
type: "GET",
|
||||
async: true,
|
||||
data: { rating_key : ${data['ratingKey']} },
|
||||
data: { rating_key : ${data['rating_key']} },
|
||||
complete: function(xhr, status) {
|
||||
$("#episode-list").html(xhr.responseText);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ episode_list Returns an array of episodes.
|
|||
data['episode_list'] :: Usable paramaters
|
||||
|
||||
== Global keys ==
|
||||
ratingKey Returns the unique identifier for the media item.
|
||||
rating_key Returns the unique identifier for the media item.
|
||||
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
title Returns the name of the episode.
|
||||
index Returns the episode number.
|
||||
|
@ -32,7 +32,7 @@ DOCUMENTATION :: END
|
|||
<li>
|
||||
<div class="season-episodes-poster">
|
||||
<div class="season-episodes-poster-face">
|
||||
<a href="info?rating_key=${a['ratingKey']}">
|
||||
<a href="info?rating_key=${a['rating_key']}">
|
||||
<img src="pms_image_proxy?img=${a['thumb']}&width=205&height=115"
|
||||
class="season-episodes-poster-face">
|
||||
</a>
|
||||
|
@ -45,7 +45,7 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
<div class="season-episodes-instance-text-wrapper">
|
||||
<div class="season-episodes-title">
|
||||
<a href="info?rating_key=${a['ratingKey']}">
|
||||
<a href="info?rating_key=${a['rating_key']}">
|
||||
"${a['title']}"
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue