mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -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,102 +1,154 @@
|
|||
<%
|
||||
import plexpy
|
||||
from plexpy import version
|
||||
import plexpy
|
||||
from plexpy import version
|
||||
%>
|
||||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PlexPy - ${title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="interfaces/default/css/plexwatch.css" rel="stylesheet">
|
||||
<link href="interfaces/default/css/style.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
||||
<link href="interfaces/default/css/font-awesome.css" rel="stylesheet" >
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.sidebar-nav {
|
||||
padding: 9px 0;
|
||||
}
|
||||
.spinner {
|
||||
padding-bottom: 25px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
${next.headIncludes()}
|
||||
<link rel="icon" type="image/x-icon" href="interfaces/default/images/favicon.ico" />
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PlexPy - ${title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="interfaces/default/css/plexwatch.css" rel="stylesheet">
|
||||
<link href="interfaces/default/css/style.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
||||
<link href="interfaces/default/css/font-awesome.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.sidebar-nav {
|
||||
padding: 9px 0;
|
||||
}
|
||||
.spinner {
|
||||
padding-bottom: 25px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
${next.headIncludes()}
|
||||
<link rel="icon" type="image/x-icon" href="interfaces/default/images/favicon.ico"/>
|
||||
|
||||
<!-- touch icons -->
|
||||
<link rel="shortcut icon" href="interfaces/default/images/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="interfaces/default/images/icon_iphone.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="interfaces/default/images/icon_ipad.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="interfaces/default/images/icon_iphone@2x.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="interfaces/default/images/icon_ipad@2x.png">
|
||||
</head>
|
||||
<!-- touch icons -->
|
||||
<link rel="shortcut icon" href="interfaces/default/images/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="interfaces/default/images/icon_iphone.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="interfaces/default/images/icon_ipad.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="interfaces/default/images/icon_iphone@2x.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="interfaces/default/images/icon_ipad@2x.png">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="ajaxMsg" class="ajaxMsg"></div>
|
||||
% if plexpy.CONFIG.CHECK_GITHUB and not plexpy.CURRENT_VERSION:
|
||||
<div id="updatebar">
|
||||
You're running an unknown version of PlexPy. <a href="update">Update</a> or
|
||||
<a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
|
||||
</div>
|
||||
% elif plexpy.CONFIG.CHECK_GITHUB and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
|
||||
<div id="updatebar">
|
||||
A <a href="https://github.com/${plexpy.CONFIG.GIT_USER}/plexpy/compare/${plexpy.CURRENT_VERSION}...${plexpy.LATEST_VERSION}"> newer version</a> is available. You're ${plexpy.COMMITS_BEHIND} commits behind. <a href="update">Update</a> or <a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
|
||||
</div>
|
||||
% endif
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<a href="home"><div class="logo hidden-phone"></div></a>
|
||||
<ul class="nav">
|
||||
% if title=="Home":
|
||||
<li class="active"><a href="home"><i class="fa fa-home fa-2x" data-toggle="tooltip" data-placement="bottom" title="Home" id="home"></i></a></li>
|
||||
% else:
|
||||
<li><a href="home"><i class="fa fa-home fa-2x" data-toggle="tooltip" data-placement="bottom" title="Home" id="home"></i></a></li>
|
||||
% endif
|
||||
% if title=="History":
|
||||
<li class="active"><a href="history"><i class="fa fa-history fa-2x" data-toggle="tooltip" data-placement="bottom" title="History" id="history"></i></a></li>
|
||||
% else:
|
||||
<li><a href="history"><i class="fa fa-history fa-2x" data-toggle="tooltip" data-placement="bottom" title="History" id="history"></i></a></li>
|
||||
% endif
|
||||
% if title=="Users":
|
||||
<li class="active"><a href="users"><i class="fa fa-users fa-2x" data-toggle="tooltip" data-placement="bottom" title="Users" id="users"></i></a></li>
|
||||
% else:
|
||||
<li><a href="users"><i class="fa fa-users fa-2x" data-toggle="tooltip" data-placement="bottom" title="Users" id="users"></i></a></li>
|
||||
% endif
|
||||
% if title=="Graphs":
|
||||
<li class="active"><a href="graphs"><i class="fa fa-bar-chart fa-2x" data-toggle="tooltip" data-placement="bottom" title="Graphs" id="graphs"></i></a></li>
|
||||
% else:
|
||||
<li><a href="graphs"><i class="fa fa-bar-chart fa-2x" data-toggle="tooltip" data-placement="bottom" title="Graphs" id="graphs"></i></a></li>
|
||||
% endif
|
||||
% if title=="Log":
|
||||
<li class="active"><a href="logs"><i class="fa fa-book fa-2x" data-toggle="tooltip" data-placement="bottom" title="Logs" id="logs"></i></a></li>
|
||||
% else:
|
||||
<li><a href="logs"><i class="fa fa-book fa-2x" data-toggle="tooltip" data-placement="bottom" title="Logs" id="logs"></i></a></li>
|
||||
% endif
|
||||
% if title=="Settings":
|
||||
<li class="active"><a href="config"><i class="fa fa-cog fa-2x" data-toggle="tooltip" data-placement="bottom" title="Settings" id="settings"></i></a></li>
|
||||
% else:
|
||||
<li><a href="config"><i class="fa fa-cog fa-2x" data-toggle="tooltip" data-placement="bottom" title="Settings" id="settings"></i></a></li>
|
||||
% endif
|
||||
</ul>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div id="ajaxMsg" class="ajaxMsg"></div>
|
||||
% if plexpy.CONFIG.CHECK_GITHUB and not plexpy.CURRENT_VERSION:
|
||||
<div id="updatebar">
|
||||
You're running an unknown version of PlexPy. <a href="update">Update</a> or
|
||||
<a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
|
||||
</div>
|
||||
% elif plexpy.CONFIG.CHECK_GITHUB and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
|
||||
<div id="updatebar">
|
||||
A <a
|
||||
href="https://github.com/${plexpy.CONFIG.GIT_USER}/plexpy/compare/${plexpy.CURRENT_VERSION}...${plexpy.LATEST_VERSION}">
|
||||
newer version</a> is available. You're ${plexpy.COMMITS_BEHIND} commits behind. <a href="update">Update</a> or
|
||||
<a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
|
||||
</div>
|
||||
% endif
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<a href="home">
|
||||
<div class="logo hidden-phone"></div>
|
||||
</a>
|
||||
<ul class="nav">
|
||||
% if title=="Home":
|
||||
<li class="active">
|
||||
<a href="home">
|
||||
<i class="fa fa-home fa-2x" data-toggle="tooltip" data-placement="bottom" title="Home" id="home"></i>
|
||||
</a>
|
||||
</li>
|
||||
% else:
|
||||
<li>
|
||||
<a href="home">
|
||||
<i class="fa fa-home fa-2x" data-toggle="tooltip" data-placement="bottom" title="Home" id="home"></i>
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% if title=="History":
|
||||
<li class="active">
|
||||
<a href="history">
|
||||
<i class="fa fa-history fa-2x" data-toggle="tooltip" data-placement="bottom" title="History" id="history"></i>
|
||||
</a>
|
||||
</li>
|
||||
% else:
|
||||
<li>
|
||||
<a href="history">
|
||||
<i class="fa fa-history fa-2x" data-toggle="tooltip" data-placement="bottom" title="History" id="history"></i>
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% if title=="Users":
|
||||
<li class="active">
|
||||
<a href="users">
|
||||
<i class="fa fa-users fa-2x" data-toggle="tooltip" data-placement="bottom" title="Users" id="users"></i>
|
||||
</a>
|
||||
</li>
|
||||
% else:
|
||||
<li>
|
||||
<a href="users">
|
||||
<i class="fa fa-users fa-2x" data-toggle="tooltip" data-placement="bottom" title="Users" id="users"></i>
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% if title=="Graphs":
|
||||
<li class="active">
|
||||
<a href="graphs">
|
||||
<i class="fa fa-bar-chart fa-2x" data-toggle="tooltip" data-placement="bottom" title="Graphs" id="graphs"></i>
|
||||
</a>
|
||||
</li>
|
||||
% else:
|
||||
<li>
|
||||
<a href="graphs">
|
||||
<i class="fa fa-bar-chart fa-2x" data-toggle="tooltip" data-placement="bottom" title="Graphs" id="graphs"></i>
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% if title=="Log":
|
||||
<li class="active">
|
||||
<a href="logs">
|
||||
<i class="fa fa-book fa-2x" data-toggle="tooltip" data-placement="bottom" title="Logs" id="logs"></i>
|
||||
</a>
|
||||
</li>
|
||||
% else:
|
||||
<li>
|
||||
<a href="logs">
|
||||
<i class="fa fa-book fa-2x" data-toggle="tooltip" data-placement="bottom" title="Logs" id="logs"></i>
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% if title=="Settings":
|
||||
<li class="active">
|
||||
<a href="config">
|
||||
<i class="fa fa-cog fa-2x" data-toggle="tooltip" data-placement="bottom" title="Settings" id="settings"></i>
|
||||
</a>
|
||||
</li>
|
||||
% else:
|
||||
<li>
|
||||
<a href="config">
|
||||
<i class="fa fa-cog fa-2x" data-toggle="tooltip" data-placement="bottom"
|
||||
title="Settings" id="settings"></i></a></li>
|
||||
% endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
${next.headerIncludes()}
|
||||
${next.body()}
|
||||
${next.headerIncludes()}
|
||||
${next.body()}
|
||||
|
||||
<script src="interfaces/default/js/jquery-2.1.4.min.js"></script>
|
||||
<script src="interfaces/default/js/bootstrap.js"></script>
|
||||
<script>
|
||||
<script src="interfaces/default/js/jquery-2.1.4.min.js"></script>
|
||||
<script src="interfaces/default/js/bootstrap.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#home').tooltip();
|
||||
});
|
||||
|
@ -115,9 +167,10 @@
|
|||
$(document).ready(function() {
|
||||
$('#settings').tooltip();
|
||||
});
|
||||
</script>
|
||||
<script src="interfaces/default/js/script.js"></script>
|
||||
${next.javascriptIncludes()}
|
||||
|
||||
</script>
|
||||
<script src="interfaces/default/js/script.js"></script>
|
||||
${next.javascriptIncludes()}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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
|
|
@ -1,9 +1,25 @@
|
|||
% if activity != None:
|
||||
% if activity == '0':
|
||||
<h3>Activity</h3>
|
||||
% else:
|
||||
<h3>Activity <strong>${activity}</strong> stream(s)</h3>
|
||||
% endif
|
||||
<%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_header.html
|
||||
Version: 0.1
|
||||
Variable names: data [string]
|
||||
|
||||
data :: Usable parameters
|
||||
|
||||
data Returns the current number of active streams
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
% if data == '0':
|
||||
<h3>Activity</h3>
|
||||
% else:
|
||||
<h3>Activity</h3>
|
||||
<h3>Activity <strong>${data}</strong> stream(s)</h3>
|
||||
% endif
|
||||
% else:
|
||||
<h3>Activity</h3>
|
||||
% endif
|
|
@ -26,7 +26,8 @@ from plexpy import helpers
|
|||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<div class="span12">
|
||||
<div class="span8"><h4>Daily Watch History (Past <span class="days">30</span> days)</h4></div>
|
||||
<div class="span8"><h4>Daily Watch History (Past <span class="days">30</span> days)</h4>
|
||||
</div>
|
||||
<div class="span4" style="text-align: right; padding-right: 30px;">
|
||||
<h5>
|
||||
<a href="javascript:void(0)" id="graph-30"> 30 days</a> |
|
||||
|
@ -40,7 +41,8 @@ from plexpy import helpers
|
|||
<div>
|
||||
<div class="graphs-instance">
|
||||
<div class="watch-chart" id="chart_div_plays_by_day">
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div><br>
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,7 +57,9 @@ from plexpy import helpers
|
|||
</div>
|
||||
<div class="graphs-instance">
|
||||
<div class="watch-chart" id="chart_div_plays_by_dayofweek" style="float: left;">
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div><br>
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -67,7 +71,9 @@ from plexpy import helpers
|
|||
</div>
|
||||
<div class="graphs-instance">
|
||||
<div class="watch-chart" id="chart_div_plays_by_hourofday">
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div><br>
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -159,5 +165,6 @@ from plexpy import helpers
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</%def>
|
|
@ -1,57 +1,58 @@
|
|||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from plexpy import helpers
|
||||
from plexpy import helpers
|
||||
%>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellheader-bg">
|
||||
<div class="dashboard-wellheader-no-chevron">
|
||||
<h2><i class="fa fa-history"></i> History</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
<table class="display" id="history_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="id"><i class='fa fa-sort'></i> ID</th>
|
||||
<th align='left' id="time"><i class='fa fa-sort'></i> Time</th>
|
||||
<th align='left' id="user"><i class='fa fa-sort'></i> User</th>
|
||||
<th align='left' id="platform"><i class='fa fa-sort'></i> Platform</th>
|
||||
<th align='left' id="ip_address"><i class='fa fa-sort'></i> IP Address</th>
|
||||
<th align='left' id="title"><i class='fa fa-sort'></i> Title</th>
|
||||
<th align='left' id="started"><i class='fa fa-sort'></i> Started</th>
|
||||
<th align='left' id="paused_counter"><i class='fa fa-sort'></i> Paused</th>
|
||||
<th align='left' id="stopped"><i class='fa fa-sort'></i> Stopped</th>
|
||||
<th align='left' id="duration"><i class='fa fa-sort'></i> Duration</th>
|
||||
<th align='left' id="percent_complete"> Completed</th>
|
||||
<th align='left' id="rating_key"> RatingKey</th>
|
||||
<th align='left' id="xml"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="info-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="info-modal" aria-hidden="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellheader-bg">
|
||||
<div class="dashboard-wellheader-no-chevron">
|
||||
<h2><i class="fa fa-history"></i> History</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
<table class="display" id="history_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="id"><i class='fa fa-sort'></i> ID</th>
|
||||
<th align='left' id="time"><i class='fa fa-sort'></i> Time</th>
|
||||
<th align='left' id="user"><i class='fa fa-sort'></i> User</th>
|
||||
<th align='left' id="platform"><i class='fa fa-sort'></i> Platform</th>
|
||||
<th align='left' id="ip_address"><i class='fa fa-sort'></i> IP Address</th>
|
||||
<th align='left' id="title"><i class='fa fa-sort'></i> Title</th>
|
||||
<th align='left' id="started"><i class='fa fa-sort'></i> Started</th>
|
||||
<th align='left' id="paused_counter"><i class='fa fa-sort'></i> Paused</th>
|
||||
<th align='left' id="stopped"><i class='fa fa-sort'></i> Stopped</th>
|
||||
<th align='left' id="duration"><i class='fa fa-sort'></i> Duration</th>
|
||||
<th align='left' id="percent_complete"> Completed</th>
|
||||
<th align='left' id="rating_key"> RatingKey</th>
|
||||
<th align='left' id="xml"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="info-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="info-modal"
|
||||
aria-hidden="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
|
||||
|
@ -69,6 +70,7 @@
|
|||
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</%def>
|
||||
|
|
|
@ -1,8 +1,45 @@
|
|||
% if stats != None:
|
||||
% if stats[0]['rows']:
|
||||
<%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: home_stats.html
|
||||
Version: 0.1
|
||||
Variable names: data [array]
|
||||
|
||||
data[array_index] :: Usable parameters
|
||||
|
||||
data['stat_id'] Returns the name of the stat. Either 'top_tv', 'popular_tv', 'top_user' or 'top_platform'
|
||||
data['rows'] Returns an array containing stat data
|
||||
|
||||
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.
|
||||
|
||||
== Only if 'stat_id' is 'top_tv' or 'top_user' or 'top_platform' ==
|
||||
total_plays Returns the count for the associated stat.
|
||||
|
||||
== Only of 'stat_id' is 'popular_tv' ==
|
||||
users_watched Returns the count for the associated stat.
|
||||
|
||||
== Only if 'stat_id' is 'top_user' ==
|
||||
thumb Returns url of the user's gravatar. Returns '' if none exists.
|
||||
user Returns the username for the associated stat.
|
||||
|
||||
== Only if 'stat_id' is 'top_platform' ==
|
||||
platform_type Returns the platform name for the associated stat.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
% if data[0]['rows']:
|
||||
<div class="user-platforms">
|
||||
<ul>
|
||||
% for a in stats:
|
||||
% for a in data:
|
||||
% if a['stat_id'] == 'top_tv':
|
||||
<div class="home-platforms-instance">
|
||||
<li>
|
||||
|
@ -16,6 +53,7 @@
|
|||
% endif
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="home-platforms-instance-name">
|
||||
<h4>Most Watched TV</h4>
|
||||
<a href="info?rating_key=${a['rows'][0]['rating_key']}">
|
||||
|
@ -24,6 +62,7 @@
|
|||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<h3>${a['rows'][0]['total_plays']}</h3>
|
||||
|
||||
<p> plays</p>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -41,6 +80,7 @@
|
|||
% endif
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="home-platforms-instance-name">
|
||||
<h4>Most Popular TV</h4>
|
||||
<a href="info?rating_key=${a['rows'][0]['rating_key']}">
|
||||
|
@ -49,6 +89,7 @@
|
|||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<h3>${a['rows'][0]['users_watched']}</h3>
|
||||
|
||||
<p> users</p>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -67,6 +108,7 @@
|
|||
% endif
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="home-platforms-instance-name">
|
||||
<h4>Most Active User</h4>
|
||||
<a href="user?user=${a['rows'][0]['user']}">
|
||||
|
@ -75,6 +117,7 @@
|
|||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<h3>${a['rows'][0]['total_plays']}</h3>
|
||||
|
||||
<p> plays</p>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -91,12 +134,14 @@
|
|||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<h3>${a['rows'][0]['total_plays']}</h3>
|
||||
|
||||
<p> plays</p>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<script>
|
||||
$("#platform-stat").html("<img class='home-platforms-instance-box' src='" + getPlatformImagePath('${a['rows'][0]['platform_type']}') + "'>");
|
||||
|
||||
</script>
|
||||
% endif
|
||||
% endfor
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from plexpy import helpers
|
||||
from plexpy import helpers
|
||||
%>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
|
@ -21,7 +21,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="currentActivity">
|
||||
<div class="muted"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div><br>
|
||||
<div class="muted"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,7 +36,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="home-stats" class="user-platforms">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading stats...</div><br>
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading stats...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,7 +50,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id='recentlyAdded'>
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Looking for new items...</div><br>
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Looking for new items...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -127,6 +130,7 @@
|
|||
|
||||
getHomeStats(30);
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</%def>
|
||||
|
|
|
@ -1,253 +1,304 @@
|
|||
<%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: info.html
|
||||
Version: 0.1
|
||||
Variable names: data [list]
|
||||
|
||||
data :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
ratingKey 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.
|
||||
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.
|
||||
index Returns the episode number.
|
||||
parentThumb 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' ==
|
||||
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
|
||||
</%doc>
|
||||
|
||||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from plexpy import helpers
|
||||
from plexpy import helpers
|
||||
%>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
% if metadata:
|
||||
<div class="clear"></div>
|
||||
<div class="container-fluid">
|
||||
<!-- Some span12 if parameter -->
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<!-- end span12 if -->
|
||||
<!-- if art -->
|
||||
<div class="art-face" style="background-image:url(pms_image_proxy?img=${metadata['art']}&width=1920&height=1080)">
|
||||
<!-- if not art
|
||||
<div class="art-face">
|
||||
-->
|
||||
<div class="summary-wrapper">
|
||||
<div class="summary-overlay">
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span9">
|
||||
|
||||
<div class="summary-content-poster hidden-phone hidden-tablet">
|
||||
% if metadata['type'] == 'episode':
|
||||
<img src="pms_image_proxy?img=${metadata['parentThumb']}&width=256&height=352">
|
||||
% else:
|
||||
<img src="pms_image_proxy?img=${metadata['thumb']}&width=256&height=352">
|
||||
% endif
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-content-title">
|
||||
% if metadata['type'] == 'movie':
|
||||
<h1>${metadata['title']} (${metadata['year']})</h1>
|
||||
% elif metadata['type'] == 'season':
|
||||
<h1>${metadata['parentTitle']} (${metadata['title']})</h1>
|
||||
% elif metadata['type'] == 'episode':
|
||||
<h1>${metadata['grandparentTitle']} (Season ${metadata['parentIndex']}, Episode ${metadata['index']}) "${metadata['title']}"</h1>
|
||||
% else:
|
||||
<h1>${metadata['title']}</h1>
|
||||
% endif
|
||||
</div>
|
||||
% if metadata['type'] == 'movie':
|
||||
<div id="stars" class="rateit hidden-phone hidden-tablet" data-rateit-value="" data-rateit-ispreset="true" data-rateit-readonly="true"></div>
|
||||
% endif
|
||||
<div class="summary-content-details-wrapper">
|
||||
<div class="summary-content-director">
|
||||
% if metadata['type'] == 'episode' or metadata['type'] == 'movie':
|
||||
% if metadata['directors']:
|
||||
Directed by <strong> ${metadata['directors'][0]}</strong>
|
||||
% else:
|
||||
Directed by <strong> unknown</strong>
|
||||
% endif
|
||||
% elif metadata['type'] == 'show' or metadata['type'] == 'season':
|
||||
Studio <strong> ${metadata['studio']}</strong>
|
||||
% endif
|
||||
</div>
|
||||
<div class="summary-content-duration">
|
||||
Runtime <strong> ${metadata['duration']} mins</strong>
|
||||
</div>
|
||||
<div class="summary-content-content-rating">
|
||||
Rated <strong> ${metadata['contentRating']} </strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-content-summary">
|
||||
<p> ${metadata['summary']} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% if metadata['type'] == 'episode':
|
||||
<div class="span3">
|
||||
<div class="summary-content-people-wrapper hidden-phone hidden-tablet">
|
||||
<div class="summary-content-writers">
|
||||
<h6><strong>Written by</strong></h6>
|
||||
<ul>
|
||||
% for writer in metadata['writers']:
|
||||
% if loop.index < 5:
|
||||
<li>
|
||||
${writer}
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% elif metadata['type'] == 'movie' or metadata['type'] == 'show':
|
||||
<div class="span3">
|
||||
<div class="summary-content-people-wrapper hidden-phone hidden-tablet">
|
||||
<div class="summary-content-actors">
|
||||
<h6><strong>Genres</strong></h6>
|
||||
<ul>
|
||||
% for genre in metadata['genres']:
|
||||
% if loop.index < 5:
|
||||
<li>
|
||||
${genre}
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary-content-people-wrapper hidden-phone hidden-tablet">
|
||||
<div class="summary-content-actors">
|
||||
<h6><strong>Starring</strong></h6>
|
||||
<ul>
|
||||
% for actor in metadata['actors']:
|
||||
% if loop.index < 5:
|
||||
<li>
|
||||
${actor}
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% elif metadata['type'] == 'season':
|
||||
<div class="span3"></div>
|
||||
% if data:
|
||||
<div class="clear"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="art-face"
|
||||
style="background-image:url(pms_image_proxy?img=${data['art']}&width=1920&height=1080)">
|
||||
<div class="summary-wrapper">
|
||||
<div class="summary-overlay">
|
||||
<div class="row-fluid">
|
||||
<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">
|
||||
% else:
|
||||
<img src="pms_image_proxy?img=${data['thumb']}&width=256&height=352">
|
||||
% endif
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-content-title">
|
||||
% if data['type'] == 'movie':
|
||||
<h1>${data['title']} (${data['year']})</h1>
|
||||
% elif data['type'] == 'season':
|
||||
<h1>${data['parentTitle']} (${data['title']})</h1>
|
||||
% elif data['type'] == 'episode':
|
||||
<h1>${data['grandparentTitle']} (Season ${data['parentIndex']}, Episode
|
||||
${data['index']}) "${data['title']}"</h1>
|
||||
% else:
|
||||
<h1>${data['title']}</h1>
|
||||
% endif
|
||||
</div>
|
||||
% if data['type'] == 'movie':
|
||||
<div id="stars" class="rateit hidden-phone hidden-tablet" data-rateit-value=""
|
||||
data-rateit-ispreset="true" data-rateit-readonly="true"></div>
|
||||
% endif
|
||||
<div class="summary-content-details-wrapper">
|
||||
<div class="summary-content-director">
|
||||
% if data['type'] == 'episode' or data['type'] == 'movie':
|
||||
% if data['directors']:
|
||||
Directed by <strong> ${data['directors'][0]}</strong>
|
||||
% else:
|
||||
Directed by <strong> unknown</strong>
|
||||
% endif
|
||||
% elif data['type'] == 'show' or data['type'] == 'season':
|
||||
Studio <strong> ${data['studio']}</strong>
|
||||
% endif
|
||||
</div>
|
||||
<div class="summary-content-duration">
|
||||
Runtime <strong> ${data['duration']} mins</strong>
|
||||
</div>
|
||||
<div class="summary-content-content-rating">
|
||||
Rated <strong> ${data['contentRating']} </strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-content-summary">
|
||||
<p> ${data['summary']} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% if data['type'] == 'episode':
|
||||
<div class="span3">
|
||||
<div class="summary-content-people-wrapper hidden-phone hidden-tablet">
|
||||
<div class="summary-content-writers">
|
||||
<h6><strong>Written by</strong></h6>
|
||||
<ul>
|
||||
% for writer in data['writers']:
|
||||
% if loop.index < 5:
|
||||
<li>
|
||||
${writer}
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% elif data['type'] == 'movie' or data['type'] == 'show':
|
||||
<div class="span3">
|
||||
<div class="summary-content-people-wrapper hidden-phone hidden-tablet">
|
||||
<div class="summary-content-actors">
|
||||
<h6><strong>Genres</strong></h6>
|
||||
<ul>
|
||||
% for genre in data['genres']:
|
||||
% if loop.index < 5:
|
||||
<li>
|
||||
${genre}
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary-content-people-wrapper hidden-phone hidden-tablet">
|
||||
<div class="summary-content-actors">
|
||||
<h6><strong>Starring</strong></h6>
|
||||
<ul>
|
||||
% for actor in data['actors']:
|
||||
% if loop.index < 5:
|
||||
<li>
|
||||
${actor}
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% elif data['type'] == 'season':
|
||||
<div class="span3"></div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- span rule -->
|
||||
</div>
|
||||
</div>
|
||||
<!--}-->
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
% if metadata['type'] == 'movie' or metadata['type'] == 'episode' or metadata['type'] == 'show':
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Watch history for <strong>${metadata['title']}</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<table class="display" id="history_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="id"><i class='fa fa-sort'></i> ID</th>
|
||||
<th align='left' id="date"><i class='fa fa-sort'></i> Time</th>
|
||||
<th align='left' id="user"><i class='fa fa-sort'></i> User</th>
|
||||
<th align='left' id="platform"><i class='fa fa-sort'></i> Platform</th>
|
||||
<th align='left' id="ip_address"><i class='fa fa-sort'></i> IP Address</th>
|
||||
<th align='left' id="title"><i class='fa fa-sort'></i> Title</th>
|
||||
<th align='left' id="started"><i class='fa fa-sort'></i> Started</th>
|
||||
<th align='left' id="paused_counter"><i class='fa fa-sort'></i> Paused</th>
|
||||
<th align='left' id="stopped"><i class='fa fa-sort'></i> Stopped</th>
|
||||
<th align='left' id="duration"><i class='fa fa-sort'></i> Duration</th>
|
||||
<th align='left' id="percent_complete"> Completed</th>
|
||||
<th align='left' id="rating_key"> RatingKey</th>
|
||||
<th align='left' id="xml"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="info-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="info-modal" aria-hidden="true">
|
||||
</div>
|
||||
% elif metadata['type'] == 'season':
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Episode list for <strong>${metadata['title']}</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="episode-list">
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% else:
|
||||
<div class="clear"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1">
|
||||
<h3>Error retrieving item metadata. This media may not be available in the Plex Media Server database anymore.</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
% if data['type'] == 'movie' or data['type'] == 'episode' or data['type'] == 'show':
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Watch history for <strong>${data['title']}</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<table class="display" id="history_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="id"><i class='fa fa-sort'></i> ID</th>
|
||||
<th align='left' id="date"><i class='fa fa-sort'></i> Time</th>
|
||||
<th align='left' id="user"><i class='fa fa-sort'></i> User</th>
|
||||
<th align='left' id="platform"><i class='fa fa-sort'></i> Platform</th>
|
||||
<th align='left' id="ip_address"><i class='fa fa-sort'></i> IP Address</th>
|
||||
<th align='left' id="title"><i class='fa fa-sort'></i> Title</th>
|
||||
<th align='left' id="started"><i class='fa fa-sort'></i> Started</th>
|
||||
<th align='left' id="paused_counter"><i class='fa fa-sort'></i> Paused</th>
|
||||
<th align='left' id="stopped"><i class='fa fa-sort'></i> Stopped</th>
|
||||
<th align='left' id="duration"><i class='fa fa-sort'></i> Duration</th>
|
||||
<th align='left' id="percent_complete"> Completed</th>
|
||||
<th align='left' id="rating_key"> RatingKey</th>
|
||||
<th align='left' id="xml"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="info-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="info-modal"
|
||||
aria-hidden="true">
|
||||
</div>
|
||||
% elif data['type'] == 'season':
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Episode list for <strong>${data['title']}</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="episode-list">
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
% else:
|
||||
<div class="clear"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1">
|
||||
<h3>Error retrieving item data. This media may not be available in the Plex Media Server database
|
||||
anymore.</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/default/js/jquery.rateit.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
||||
<script src="interfaces/default/js/jquery.rateit.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
||||
|
||||
% if metadata:
|
||||
% if metadata['type'] == 'movie':
|
||||
<script>
|
||||
// Convert rating to 5 star rating type
|
||||
var starRating = Math.round(${metadata['rating']} / 2)
|
||||
$('#stars').attr('data-rateit-value', starRating)
|
||||
</script>
|
||||
% endif
|
||||
% if metadata['type'] == 'movie' or metadata['type'] == 'episode':
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
"data": function(d) {
|
||||
d.rating_key = ${metadata['ratingKey']};
|
||||
}
|
||||
}
|
||||
% if data:
|
||||
% if data['type'] == 'movie':
|
||||
<script>
|
||||
// Convert rating to 5 star rating type
|
||||
var starRating = Math.round(${data['rating']} / 2)
|
||||
$('#stars').attr('data-rateit-value', starRating)
|
||||
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
</script>
|
||||
% endif
|
||||
% if data['type'] == 'movie' or data['type'] == 'episode':
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
"data": function(d) {
|
||||
d.rating_key = ${data['ratingKey']};
|
||||
}
|
||||
}
|
||||
|
||||
// Hide the title column
|
||||
history_table.column(5).visible(false);
|
||||
});
|
||||
</script>
|
||||
% elif metadata['type'] == 'show':
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
"data": function(d) {
|
||||
d.grandparent_rating_key = ${metadata['ratingKey']};
|
||||
}
|
||||
}
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
});
|
||||
</script>
|
||||
% endif
|
||||
% if metadata['type'] == 'season':
|
||||
<script>
|
||||
$.ajax({
|
||||
url: 'get_children',
|
||||
type: "GET",
|
||||
async: true,
|
||||
data: { rating_key : ${metadata['ratingKey']} },
|
||||
complete: function(xhr, status) {
|
||||
$("#episode-list").html(xhr.responseText);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
% endif
|
||||
% endif
|
||||
// Hide the title column
|
||||
history_table.column(5).visible(false);
|
||||
});
|
||||
|
||||
</script>
|
||||
% elif data['type'] == 'show':
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
"data": function(d) {
|
||||
d.grandparent_rating_key = ${data['ratingKey']};
|
||||
}
|
||||
}
|
||||
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
% endif
|
||||
% if data['type'] == 'season':
|
||||
<script>
|
||||
$.ajax({
|
||||
url: 'get_children',
|
||||
type: "GET",
|
||||
async: true,
|
||||
data: { rating_key : ${data['ratingKey']} },
|
||||
complete: function(xhr, status) {
|
||||
$("#episode-list").html(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
% endif
|
||||
% endif
|
||||
</%def>
|
||||
|
|
|
@ -1,8 +1,34 @@
|
|||
% if episode_list != None:
|
||||
% if episode_list['episode_count'] > 0:
|
||||
<%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: info_episode_list.html
|
||||
Version: 0.1
|
||||
Variable names: data [list]
|
||||
|
||||
data :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
episode_count Returns the number of episodes in the array.
|
||||
episode_list Returns an array of episodes.
|
||||
|
||||
data['episode_list'] :: Usable paramaters
|
||||
|
||||
== Global keys ==
|
||||
ratingKey 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.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
% if data['episode_count'] > 0:
|
||||
<div class="season-episodes-wrapper">
|
||||
<ul class="season-episodes-instance">
|
||||
% for a in episode_list['episode_list']:
|
||||
% for a in data['episode_list']:
|
||||
<li>
|
||||
<div class="season-episodes-poster">
|
||||
<div class="season-episodes-poster-face">
|
||||
|
|
|
@ -1,80 +1,75 @@
|
|||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from plexpy import helpers
|
||||
from plexpy import helpers
|
||||
%>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
<style>
|
||||
td {word-wrap: break-word}
|
||||
</style>
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
<style>
|
||||
td {word-wrap: break-word}
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
<%def name="headerIncludes()">
|
||||
<!--<div id="subhead_container">
|
||||
<div id="subhead_menu">
|
||||
<a class="menu_link_edit" href="clearLogs"><i class="fa fa-trash-o"></i> Clear log</a>
|
||||
</div>
|
||||
</div>-->
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellheader-bg">
|
||||
<div class="dashboard-wellheader-no-chevron">
|
||||
<div class="span9"><h2><i class="fa fa-book"></i> Logs</h2></div>
|
||||
<div class="span3">
|
||||
<div class="pull-right">
|
||||
<h5><a id="menu_link_edit" href="clearLogs"><i class="fa fa-trash-o"></i> Clear log</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
<table class="display" id="log_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="timestamp"><i class='fa fa-sort'></i> Timestamp</th>
|
||||
<th align='left' id="level"><i class='fa fa-sort'></i> Level</th>
|
||||
<th align='left' id="message"><i class='fa fa-sort'></i> Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellheader-bg">
|
||||
<div class="dashboard-wellheader-no-chevron">
|
||||
<div class="span9"><h2><i class="fa fa-book"></i> Logs</h2></div>
|
||||
<div class="span3">
|
||||
<div class="pull-right">
|
||||
<h5><a id="menu_link_edit" href="clearLogs"><i class="fa fa-trash-o"></i> Clear log</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div align="center">Refresh rate:
|
||||
<select id="refreshrate" onchange="setRefresh()">
|
||||
<option value="0" selected="selected">No Refresh</option>
|
||||
<option value="5">5 Seconds</option>
|
||||
<option value="15">15 Seconds</option>
|
||||
<option value="30">30 Seconds</option>
|
||||
<option value="60">60 Seconds</option>
|
||||
<option value="300">5 Minutes</option>
|
||||
<option value="600">10 Minutes</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
<table class="display" id="log_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="timestamp"><i class='fa fa-sort'></i> Timestamp</th>
|
||||
<th align='left' id="level"><i class='fa fa-sort'></i> Level</th>
|
||||
<th align='left' id="message"><i class='fa fa-sort'></i> Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div align="center">Refresh rate:
|
||||
<select id="refreshrate" onchange="setRefresh()">
|
||||
<option value="0" selected="selected">No Refresh</option>
|
||||
<option value="5">5 Seconds</option>
|
||||
<option value="15">15 Seconds</option>
|
||||
<option value="30">30 Seconds</option>
|
||||
<option value="60">60 Seconds</option>
|
||||
<option value="300">5 Minutes</option>
|
||||
<option value="600">10 Minutes</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/tables/logs.js"></script>
|
||||
<script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/tables/logs.js"></script>
|
||||
<script>
|
||||
var timer;
|
||||
function setRefresh()
|
||||
{
|
||||
|
@ -91,5 +86,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</script>
|
||||
</%def>
|
||||
|
|
|
@ -1,36 +1,64 @@
|
|||
% if recently_added != None:
|
||||
<div class="dashboard-recent-media-row">
|
||||
<ul class="dashboard-recent-media">
|
||||
% for item in recently_added:
|
||||
<div class="dashboard-recent-media-instance">
|
||||
<li>
|
||||
<div class="poster">
|
||||
<div class="poster-face">
|
||||
<a href="info?rating_key=${item['ratingKey']}">
|
||||
% if item['thumb'] != '':
|
||||
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
|
||||
% else:
|
||||
<img src="interfaces/default/images/poster.png" class="poster-face">
|
||||
% endif
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-recent-media-metacontainer">
|
||||
% if item['type'] == 'season':
|
||||
<h3>${item['title']}</h3>
|
||||
% elif item['type'] == 'movie':
|
||||
<h3>${item['title']} (${item['year']})</h3>
|
||||
<%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: recently_added.html
|
||||
Version: 0.1
|
||||
Variable names: data [array]
|
||||
|
||||
data[array_index] :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
ratingKey Returns the unique identifier for the media item.
|
||||
type Returns the type of media. Either 'movie' or 'season'.
|
||||
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
addedAt Returns the time when the media was added to the library.
|
||||
title Returns the name of the movie or season.
|
||||
|
||||
== Only if 'type' is 'movie' ==
|
||||
year Returns the movie release year.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
<div class="dashboard-recent-media-row">
|
||||
<ul class="dashboard-recent-media">
|
||||
% for item in data:
|
||||
<div class="dashboard-recent-media-instance">
|
||||
<li>
|
||||
<div class="poster">
|
||||
<div class="poster-face">
|
||||
<a href="info?rating_key=${item['ratingKey']}">
|
||||
% if item['thumb'] != '':
|
||||
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
|
||||
% else:
|
||||
<img src="interfaces/default/images/poster.png" class="poster-face">
|
||||
% endif
|
||||
<div class="muted" id="addedAt-${item['ratingKey']}">${item['addedAt']}</div>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#addedAt-${item['ratingKey']}').html('Added ' + moment(${item['addedAt']}, "X").fromNow())
|
||||
</script>
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dashboard-recent-media-metacontainer">
|
||||
% if item['type'] == 'season':
|
||||
<h3>${item['title']}</h3>
|
||||
% elif item['type'] == 'movie':
|
||||
<h3>${item['title']} (${item['year']})</h3>
|
||||
% endif
|
||||
<div class="muted" id="addedAt-${item['ratingKey']}">${item['addedAt']}</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<script>
|
||||
$('#addedAt-${item['ratingKey']}').html('Added ' + moment(${item['addedAt']}, "X").fromNow())
|
||||
|
||||
|
||||
</script>
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
% 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">There was an error communicating with your Plex Server. Please check your <a
|
||||
href="config">settings</a>.
|
||||
</div><br>
|
||||
% endif
|
|
@ -1,7 +1,7 @@
|
|||
<%inherit file="base.html"/>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<meta http-equiv="refresh" content="${timer};url=index">
|
||||
<meta http-equiv="refresh" content="${timer};url=index">
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
|
@ -11,8 +11,8 @@
|
|||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h2><i class="fa fa-refresh fa-spin"></i> PlexPy is ${message}</h2>
|
||||
</div>
|
||||
<h2><i class="fa fa-refresh fa-spin"></i> PlexPy is ${message}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,52 +1,90 @@
|
|||
<%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: stream_data.html
|
||||
Version: 0.1
|
||||
Variable names: data [list]
|
||||
|
||||
data :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
media_type Returns the type of session. Either 'episode' or 'movie'.
|
||||
title Returns the name of the episode or movie.
|
||||
user Returns the name of the user.
|
||||
transcode_video_dec Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
||||
transcode_video_codec Returns the name of the video codec for the stream.
|
||||
transcode_height Returns the value of the video height for the stream.
|
||||
transcode_width Returns the value of the video width for the stream.
|
||||
transcode_audio_dec Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'.
|
||||
transcode_audio_codec Returns the name of the audio codec for the stream.
|
||||
transcode_audio_channels Returns the number of audio channels for the stream.
|
||||
container Returns the type of container for the original media.
|
||||
height Returns the value of the video height for the original media.
|
||||
bitrate Returns the value of the video bitrate for the original media.
|
||||
width Returns the value of the video width for the original media.
|
||||
aspect_ratio Returns the value of the video aspect ratio for the original media.
|
||||
video_framerate Returns the value of the video framerate for the original media.
|
||||
video_codec Returns the name of the video codec for the original media.
|
||||
audio_codec Returns the name of the audio codec for the original media.
|
||||
audio_channels Returns the number of audio channels for the original media.
|
||||
|
||||
== Only if 'media_type' is 'episode' ==
|
||||
grandparent_title Returns the name of the TV Show.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data is not None:
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||
% if data['media_type'] == 'episode':
|
||||
<h3 id="myModalLabel">Stream Info: <strong>${data['grandparent_title']} - ${data['title']} (${user})</strong></h3>
|
||||
% else:
|
||||
<h3 id="myModalLabel">Stream Info: <strong>${data['title']} (${user})</strong></h3>
|
||||
% endif
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||
% if data['media_type'] == 'episode':
|
||||
<h3 id="myModalLabel">Stream Info: <strong>${data['grandparent_title']} - ${data['title']} (${user})</strong></h3>
|
||||
% else:
|
||||
<h3 id="myModalLabel">Stream Info: <strong>${data['title']} (${user})</strong></h3>
|
||||
% endif
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<div class="span4">
|
||||
<h4>Stream Details</h4>
|
||||
<ul>
|
||||
<h5>Video</h5>
|
||||
<li>Stream Type: <strong>${data['transcode_video_dec']}</strong></li>
|
||||
<li>Video Resolution: <strong>${data['transcode_height']}p</strong></li>
|
||||
<li>Video Codec: <strong>${data['transcode_video_codec']}</strong></li>
|
||||
<li>Video Width: <strong>${data['transcode_width']}</strong></li>
|
||||
<li>Video Height: <strong>${data['transcode_height']}</span></strong></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<h5>Audio</h5>
|
||||
<li>Stream Type: <strong>${data['transcode_audio_dec']}</strong></li>
|
||||
<li>Audio Codec: <strong>${data['transcode_audio_codec']}</strong></li>
|
||||
<li>Audio Channels: <strong>${data['transcode_audio_channels']}</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<div class="span4">
|
||||
<h4>Stream Details</h4>
|
||||
<ul>
|
||||
<h5>Video</h5>
|
||||
<li>Stream Type: <strong>${data['transcode_video_dec']}</strong></li>
|
||||
<li>Video Resolution: <strong>${data['transcode_height']}p</strong></li>
|
||||
<li>Video Codec: <strong>${data['transcode_video_codec']}</strong></li>
|
||||
<li>Video Width: <strong>${data['transcode_width']}</strong></li>
|
||||
<li>Video Height: <strong>${data['transcode_height']}</span></strong></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<h5>Audio</h5>
|
||||
<li>Stream Type: <strong>${data['transcode_audio_dec']}</strong></li>
|
||||
<li>Audio Codec: <strong>${data['transcode_audio_codec']}</strong></li>
|
||||
<li>Audio Channels: <strong>${data['transcode_audio_channels']}</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h4>Media Source Details</h4>
|
||||
<li>Container: <strong>${data['container']}</strong></li>
|
||||
<li>Resolution: <strong>${data['height']}p</strong></li>
|
||||
<li>Bitrate: <strong>${data['bitrate']} kbps</strong></li>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h4>Video Source Details</h4>
|
||||
<ul>
|
||||
<li>Width: <strong>${data['width']}</strong></li>
|
||||
<li>Height: <strong>${data['height']}</strong></li>
|
||||
<li>Aspect Ratio: <strong>${data['aspect_ratio']}</strong></li>
|
||||
<li>Video Frame Rate: <strong>${data['video_framerate']}</span></strong></li>
|
||||
<li>Video Codec: <strong>${data['video_codec']}</strong></li>
|
||||
</ul>
|
||||
<ul></ul>
|
||||
<h4>Audio Source Details</h4>
|
||||
<ul>
|
||||
<li>Audio Codec: <strong>${data['audio_codec']}</strong></li>
|
||||
<li>Audio Channels: <strong>${data['audio_channels']}</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h4>Media Source Details</h4>
|
||||
<li>Container: <strong>${data['container']}</strong></li>
|
||||
<li>Resolution: <strong>${data['height']}p</strong></li>
|
||||
<li>Bitrate: <strong>${data['bitrate']} kbps</strong></li>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
<div class="span4">
|
||||
<h4>Video Source Details</h4>
|
||||
<ul>
|
||||
<li>Width: <strong>${data['width']}</strong></li>
|
||||
<li>Height: <strong>${data['height']}</strong></li>
|
||||
<li>Aspect Ratio: <strong>${data['aspect_ratio']}</strong></li>
|
||||
<li>Video Frame Rate: <strong>${data['video_framerate']}</span></strong></li>
|
||||
<li>Video Codec: <strong>${data['video_codec']}</strong></li>
|
||||
</ul>
|
||||
<ul></ul>
|
||||
<h4>Audio Source Details</h4>
|
||||
<ul>
|
||||
<li>Audio Codec: <strong>${data['audio_codec']}</strong></li>
|
||||
<li>Audio Channels: <strong>${data['audio_channels']}</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
% endif
|
|
@ -1,193 +1,216 @@
|
|||
<%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: user.html
|
||||
Version: 0.1
|
||||
Variable names: user [string]
|
||||
|
||||
user :: Usable parameters
|
||||
|
||||
user Returns the name of the user.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
|
||||
</%doc>
|
||||
|
||||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from plexpy import helpers
|
||||
from plexpy import helpers
|
||||
%>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
</%def>
|
||||
|
||||
% if user != None:
|
||||
<%def name="body()">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="user-info-wrapper">
|
||||
<div class="user-info-poster-face" id="user-gravatar">
|
||||
<img src="interfaces/default/images/gravatar-default-80x80.png">
|
||||
</div>
|
||||
<div class="user-info-username">
|
||||
${user}
|
||||
</div>
|
||||
<div class="user-info-nav">
|
||||
<ul class="user-info-nav">
|
||||
<li class="active"><a href="#profile" data-toggle="tab">Profile</a></li>
|
||||
<li><a id="ip-tab-btn" href="#userAddresses" data-toggle="tab">IP Addresses</a></li>
|
||||
<li><a href="#userHistory" data-toggle="tab">History</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<%def name="body()">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="user-info-wrapper">
|
||||
<div class="user-info-poster-face" id="user-gravatar">
|
||||
<img src="interfaces/default/images/gravatar-default-80x80.png">
|
||||
</div>
|
||||
<div class="user-info-username">
|
||||
${user}
|
||||
</div>
|
||||
<div class="user-info-nav">
|
||||
<ul class="user-info-nav">
|
||||
<li class="active"><a href="#profile" data-toggle="tab">Profile</a></li>
|
||||
<li><a id="ip-tab-btn" href="#userAddresses" data-toggle="tab">IP Addresses</a></li>
|
||||
<li><a href="#userHistory" data-toggle="tab">History</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="profile">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Global Stats</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="user-time-stats" class="user-overview-stats-wrapper">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div><br>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="profile">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Global Stats</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Platform Stats</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="user-platform-stats" class="user-platforms">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Recently watched</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="user-recently-watched">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div><br>
|
||||
</div>
|
||||
<div id="user-time-stats" class="user-overview-stats-wrapper">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="userAddresses">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>IP Addresses for <strong>
|
||||
${user}
|
||||
</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<table id="user_ip_table" class="display" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left"><i class="fa fa-sort"></i> Last seen</th>
|
||||
<th align="left"><i class="fa fa-sort"></i> IP Address</th>
|
||||
<th align="left"><i class="fa fa-sort"></i> Play Count</th>
|
||||
<th align="left"><i class="fa fa-sort"></i> Platform (Last Seen)</th>
|
||||
<th align="left"> Last Watched</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="ip-info-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||
<h3 id="myModalLabel">IP Address: <strong><span id="ip_address"></span></strong></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<div class="span6">
|
||||
<h4>Location Details</h4>
|
||||
<ul>
|
||||
<li>Country: <strong><span id="country"></span></strong></li>
|
||||
<li>City: <strong><span id="city"></span></strong></li>
|
||||
<li>Region: <strong><span id="region"></span></strong></li>
|
||||
<li>Timezone: <strong><span id="timezone"></span></strong></li>
|
||||
<li>Latitude: <strong><span id="lat"></span></strong></li>
|
||||
<li>Longitude: <strong><span id="lon"></span></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h4>Connection Details</h4>
|
||||
<ul>
|
||||
<li>ISP: <strong><span id="isp"></span></strong></li>
|
||||
<li>Organization: <strong><span id="org"></span></strong></li>
|
||||
<li>AS: <strong><span id="as"></span></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Platform Stats</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="user-platform-stats" class="user-platforms">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="userHistory">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Watch History for <strong>
|
||||
${user}
|
||||
</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<table class="display" id="history_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="id"><i class='fa fa-sort'></i> ID</th>
|
||||
<th align='left' id="date"><i class='fa fa-sort'></i> Time</th>
|
||||
<th align='left' id="user"><i class='fa fa-sort'></i> User</th>
|
||||
<th align='left' id="platform"><i class='fa fa-sort'></i> Platform</th>
|
||||
<th align='left' id="ip_address"><i class='fa fa-sort'></i> IP Address</th>
|
||||
<th align='left' id="title"><i class='fa fa-sort'></i> Title</th>
|
||||
<th align='left' id="started"><i class='fa fa-sort'></i> Started</th>
|
||||
<th align='left' id="paused_counter"><i class='fa fa-sort'></i> Paused</th>
|
||||
<th align='left' id="stopped"><i class='fa fa-sort'></i> Stopped</th>
|
||||
<th align='left' id="duration"><i class='fa fa-sort'></i> Duration</th>
|
||||
<th align='left' id="percent_complete"> Completed</th>
|
||||
<th align='left' id="rating_key"> RatingKey</th>
|
||||
<th align='left' id="xml"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="info-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="info-modal" aria-hidden="true">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Recently watched</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="user-recently-watched">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer></footer>
|
||||
</%def>
|
||||
<div class="tab-pane" id="userAddresses">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>IP Addresses for <strong>
|
||||
${user}
|
||||
</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<table id="user_ip_table" class="display" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left"><i class="fa fa-sort"></i> Last seen</th>
|
||||
<th align="left"><i class="fa fa-sort"></i> IP Address</th>
|
||||
<th align="left"><i class="fa fa-sort"></i> Play Count</th>
|
||||
<th align="left"><i class="fa fa-sort"></i> Platform (Last Seen)</th>
|
||||
<th align="left"> Last Watched</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="ip-info-modal" class="modal hide fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="ip-info-modal" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i
|
||||
class="fa fa-remove"></i></button>
|
||||
<h3 id="myModalLabel">IP Address: <strong><span id="ip_address"></span></strong></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<div class="span6">
|
||||
<h4>Location Details</h4>
|
||||
<ul>
|
||||
<li>Country: <strong><span id="country"></span></strong></li>
|
||||
<li>City: <strong><span id="city"></span></strong></li>
|
||||
<li>Region: <strong><span id="region"></span></strong></li>
|
||||
<li>Timezone: <strong><span id="timezone"></span></strong></li>
|
||||
<li>Latitude: <strong><span id="lat"></span></strong></li>
|
||||
<li>Longitude: <strong><span id="lon"></span></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h4>Connection Details</h4>
|
||||
<ul>
|
||||
<li>ISP: <strong><span id="isp"></span></strong></li>
|
||||
<li>Organization: <strong><span id="org"></span></strong></li>
|
||||
<li>AS: <strong><span id="as"></span></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="userHistory">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellbg">
|
||||
<div class="wellheader">
|
||||
<div class="dashboard-wellheader">
|
||||
<h3>Watch History for <strong>
|
||||
${user}
|
||||
</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<table class="display" id="history_table" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='left' id="id"><i class='fa fa-sort'></i> ID</th>
|
||||
<th align='left' id="date"><i class='fa fa-sort'></i> Time</th>
|
||||
<th align='left' id="user"><i class='fa fa-sort'></i> User</th>
|
||||
<th align='left' id="platform"><i class='fa fa-sort'></i> Platform</th>
|
||||
<th align='left' id="ip_address"><i class='fa fa-sort'></i> IP Address</th>
|
||||
<th align='left' id="title"><i class='fa fa-sort'></i> Title</th>
|
||||
<th align='left' id="started"><i class='fa fa-sort'></i> Started</th>
|
||||
<th align='left' id="paused_counter"><i class='fa fa-sort'></i> Paused</th>
|
||||
<th align='left' id="stopped"><i class='fa fa-sort'></i> Stopped</th>
|
||||
<th align='left' id="duration"><i class='fa fa-sort'></i> Duration</th>
|
||||
<th align='left' id="percent_complete"> Completed</th>
|
||||
<th align='left' id="rating_key"> RatingKey</th>
|
||||
<th align='left' id="xml"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="info-modal" class="modal hide fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="info-modal" aria-hidden="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer></footer>
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script src="interfaces/default/js/tables/user_ips.js"></script>
|
||||
<script>
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script src="interfaces/default/js/tables/user_ips.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
// Populate watch time stats
|
||||
|
@ -252,15 +275,17 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
|
||||
</script>
|
||||
</%def>
|
||||
% else:
|
||||
<div class="clear"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1">
|
||||
<h3>Error retrieving user information. Please see the logs for more details.</h3>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1">
|
||||
<h3>Error retrieving user information. Please see the logs for more details.</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
|
@ -1,22 +1,47 @@
|
|||
% if platform_stats != None:
|
||||
% for a in platform_stats:
|
||||
<ul>
|
||||
<div class="user-platforms-instance">
|
||||
<li>
|
||||
<span id="user-platform-image-${a['result_id']}"></span>
|
||||
<div class="user-platforms-instance-name">
|
||||
${a['platform_name']}
|
||||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<h3>${a['total_plays']}</h3><p> plays</p>
|
||||
</div>
|
||||
</li>
|
||||
<%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: user_platform_stats.html
|
||||
Version: 0.1
|
||||
Variable names: data [array]
|
||||
|
||||
data[array_index] :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
result_id Returns a unique identifier for the result.
|
||||
platform_name Returns the name of the platform.
|
||||
total_plays Returns the play count for the platform.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
% for a in data:
|
||||
<ul>
|
||||
<div class="user-platforms-instance">
|
||||
<li>
|
||||
<span id="user-platform-image-${a['result_id']}"></span>
|
||||
|
||||
<div class="user-platforms-instance-name">
|
||||
${a['platform_name']}
|
||||
</div>
|
||||
</ul>
|
||||
<script>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<h3>${a['total_plays']}</h3>
|
||||
|
||||
<p> plays</p>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</ul>
|
||||
<script>
|
||||
$("#user-platform-image-${a['result_id']}").html("<img class='user-platforms-instance-poster' src='" + getPlatformImagePath('${a['platform_type']}') + "'>");
|
||||
</script>
|
||||
% endfor
|
||||
|
||||
|
||||
</script>
|
||||
% endfor
|
||||
% else:
|
||||
<div class="muted">There was an error loading your PlexWatch data. Please check your <a href="config">settings</a>.</div><br>
|
||||
<div class="muted">There was an error loading your PlexWatch data. Please check your <a href="config">settings</a>.
|
||||
</div><br>
|
||||
% endif
|
|
@ -1,36 +1,66 @@
|
|||
% if recently_watched != None:
|
||||
<div class="dashboard-recent-media-row">
|
||||
<ul class="dashboard-recent-media">
|
||||
% for item in recently_watched:
|
||||
<div class="dashboard-recent-media-instance">
|
||||
<li>
|
||||
<div class="poster">
|
||||
<div class="poster-face">
|
||||
<a href="info?rating_key=${item['rating_key']}">
|
||||
% if item['thumb'] != '':
|
||||
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
|
||||
% else:
|
||||
<img src="interfaces/default/images/poster.png" class="poster-face">
|
||||
% endif
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-recent-media-metacontainer">
|
||||
% if item['type'] == 'episode':
|
||||
<h3>Season ${item['parentIndex']}, Episode ${item['index']}</h3>
|
||||
% elif item['type'] == 'movie':
|
||||
<h3>${item['title']} (${item['year']})</h3>
|
||||
<%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: user_recently_watched.html
|
||||
Version: 0.1
|
||||
Variable names: data [array]
|
||||
|
||||
data[array_index] :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
rating_key Returns the unique identifier for the media item.
|
||||
type Returns the type of media. Either 'movie' or 'episode'.
|
||||
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
time Returns the last watched time of the media.
|
||||
title Returns the name of the movie or episode.
|
||||
|
||||
== Only if 'type' is 'episode ==
|
||||
parent_index Returns the season number.
|
||||
index Returns the episode number.
|
||||
|
||||
== Only if 'type' is 'movie' ==
|
||||
year Returns the movie release year.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
<div class="dashboard-recent-media-row">
|
||||
<ul class="dashboard-recent-media">
|
||||
% for item in data:
|
||||
<div class="dashboard-recent-media-instance">
|
||||
<li>
|
||||
<div class="poster">
|
||||
<div class="poster-face">
|
||||
<a href="info?rating_key=${item['rating_key']}">
|
||||
% if item['thumb'] != '':
|
||||
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
|
||||
% else:
|
||||
<img src="interfaces/default/images/poster.png" class="poster-face">
|
||||
% endif
|
||||
<div class="muted" id="time-${item['time']}">${item['time']}</div>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
<div class="dashboard-recent-media-metacontainer">
|
||||
% if item['type'] == 'episode':
|
||||
<h3>Season ${item['parentIndex']}, Episode ${item['index']}</h3>
|
||||
% elif item['type'] == 'movie':
|
||||
<h3>${item['title']} (${item['year']})</h3>
|
||||
% endif
|
||||
<div class="muted" id="time-${item['time']}">${item['time']}</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<script>
|
||||
$('#time-${item['time']}').html('Watched ' + moment(${item['time']}, "X").fromNow())
|
||||
</script>
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
% else:
|
||||
<div class="muted">There was an error loading your PlexWatch data. Please check your <a href="config">settings</a>.</div><br>
|
||||
<div class="muted">There was an error loading your PlexWatch data. Please check your <a href="config">settings</a>.
|
||||
</div><br>
|
||||
% endif
|
|
@ -1,26 +1,49 @@
|
|||
% if watch_stats != None:
|
||||
<%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: user_watch_time_stats.html
|
||||
Version: 0.1
|
||||
Variable names: data [array]
|
||||
|
||||
data[array_index] :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
query_days Returns the duration for the watch stats period.
|
||||
total_plays Returns the play count for the watch stat period..
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
<ul>
|
||||
% for a in watch_stats:
|
||||
<div class='user-overview-stats-instance'>
|
||||
<li>
|
||||
<div class='user-overview-stats-instance-text'>
|
||||
% for a in data:
|
||||
<div class='user-overview-stats-instance'>
|
||||
<li>
|
||||
<div class='user-overview-stats-instance-text'>
|
||||
% if a['query_days'] == 0:
|
||||
<h4>All Time</h4>
|
||||
<h4>All Time</h4>
|
||||
% elif a['query_days'] == 1:
|
||||
<h4>Last 24 hours</h4>
|
||||
<h4>Last 24 hours</h4>
|
||||
% else:
|
||||
<h4>Last ${a['query_days']} days</h4>
|
||||
<h4>Last ${a['query_days']} days</h4>
|
||||
% endif
|
||||
<h3>${a['total_plays']}</h3><p>plays</p>
|
||||
<h3>${a['total_plays']}</h3>
|
||||
|
||||
<p>plays</p>
|
||||
<span id="total-time-${a['query_days']}"></span>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<script>
|
||||
$('#total-time-${a['query_days']}').html(humanTime(${a['total_time']}));
|
||||
|
||||
|
||||
</script>
|
||||
% endfor
|
||||
</ul>
|
||||
% else:
|
||||
<div class="muted">There was an error loading your PlexWatch data. Please check your <a href="config">settings</a>.</div><br>
|
||||
<div class="muted">There was an error loading your PlexWatch data. Please check your <a href="config">settings</a>.
|
||||
</div><br>
|
||||
% endif
|
|
@ -1,55 +1,57 @@
|
|||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from plexpy import helpers
|
||||
from plexpy import helpers
|
||||
%>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellheader-bg">
|
||||
<div class="dashboard-wellheader-no-chevron">
|
||||
<h2><i class="fa fa-group"></i> Users</h2>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="wellheader-bg">
|
||||
<div class="dashboard-wellheader-no-chevron">
|
||||
<h2><i class="fa fa-group"></i> Users</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
<table id="users_list_table" class="display" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="right" id="avatar"></th>
|
||||
<th align="left" id="username"><i class='fa fa-sort'></i> User </th>
|
||||
<th align="left" id="last_seen"><i class='fa fa-sort'></i> Last Seen </th>
|
||||
<th align="left" id="last_known_ip"><i class='fa fa-sort'></i> Last Known IP </th>
|
||||
<th align="left" id="total_plays"><i class='fa fa-sort'></i> Total Plays</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-fluid'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span12'>
|
||||
<div class='wellbg'>
|
||||
<table id="users_list_table" class="display" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="right" id="avatar"></th>
|
||||
<th align="left" id="username"><i class='fa fa-sort'></i> User</th>
|
||||
<th align="left" id="last_seen"><i class='fa fa-sort'></i> Last Seen</th>
|
||||
<th align="left" id="last_known_ip"><i class='fa fa-sort'></i> Last Known IP</th>
|
||||
<th align="left" id="total_plays"><i class='fa fa-sort'></i> Total Plays</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<footer></footer>
|
||||
</div>
|
||||
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
||||
<script src="interfaces/default/js/tables/users.js"></script>
|
||||
<script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
||||
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
||||
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
||||
<script src="interfaces/default/js/tables/users.js"></script>
|
||||
<script>
|
||||
var users_list_table = $('#users_list_table').DataTable(users_list_table_options);
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
</%def>
|
||||
|
|
|
@ -80,7 +80,7 @@ class WebInterface(object):
|
|||
plex_watch = plexwatch.PlexWatch()
|
||||
stats_data = plex_watch.get_home_stats(time_range)
|
||||
|
||||
return serve_template(templatename="home_stats.html", title="Stats", stats=stats_data)
|
||||
return serve_template(templatename="home_stats.html", title="Stats", data=stats_data)
|
||||
|
||||
@cherrypy.expose
|
||||
def history(self):
|
||||
|
@ -305,7 +305,7 @@ class WebInterface(object):
|
|||
|
||||
# Write Plex token to the config
|
||||
if (not plexpy.CONFIG.PMS_TOKEN or plexpy.CONFIG.PMS_TOKEN == '' \
|
||||
or kwargs['pms_username'] != plexpy.CONFIG.PMS_USERNAME) \
|
||||
or kwargs['pms_username'] != plexpy.CONFIG.PMS_USERNAME) \
|
||||
and (kwargs['pms_username'] != '' or kwargs['pms_password'] != ''):
|
||||
|
||||
plex_tv = plextv.PlexTV(kwargs['pms_username'], kwargs['pms_password'])
|
||||
|
@ -377,7 +377,6 @@ class WebInterface(object):
|
|||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps(stream_details)
|
||||
|
||||
|
||||
@cherrypy.expose
|
||||
def shutdown(self):
|
||||
return self.do_state_change('shutdown', 'Shutting Down', 15)
|
||||
|
@ -472,12 +471,12 @@ class WebInterface(object):
|
|||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.get_current_activity()
|
||||
except:
|
||||
return serve_template(templatename="current_activity.html", activity=None)
|
||||
return serve_template(templatename="current_activity.html", data=None)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="current_activity.html", activity=result)
|
||||
return serve_template(templatename="current_activity.html", data=result)
|
||||
else:
|
||||
return serve_template(templatename="current_activity.html", activity=None)
|
||||
return serve_template(templatename="current_activity.html", data=None)
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -487,12 +486,12 @@ class WebInterface(object):
|
|||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.get_current_activity()
|
||||
except IOError, e:
|
||||
return serve_template(templatename="current_activity_header.html", activity=None)
|
||||
return serve_template(templatename="current_activity_header.html", data=None)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="current_activity_header.html", activity=result['stream_count'])
|
||||
return serve_template(templatename="current_activity_header.html", data=result['stream_count'])
|
||||
else:
|
||||
return serve_template(templatename="current_activity_header.html", activity=None)
|
||||
return serve_template(templatename="current_activity_header.html", data=None)
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -502,12 +501,12 @@ class WebInterface(object):
|
|||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.get_recently_added_details(count)
|
||||
except IOError, e:
|
||||
return serve_template(templatename="recently_added.html", recently_added=None)
|
||||
return serve_template(templatename="recently_added.html", data=None)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="recently_added.html", recently_added=result['recently_added'])
|
||||
return serve_template(templatename="recently_added.html", data=result['recently_added'])
|
||||
else:
|
||||
return serve_template(templatename="recently_added.html", recently_added=None)
|
||||
return serve_template(templatename="recently_added.html", data=None)
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -532,9 +531,9 @@ class WebInterface(object):
|
|||
result = pms_connect.get_metadata_details(rating_key)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="info.html", metadata=result['metadata'], title="Info")
|
||||
return serve_template(templatename="info.html", data=result['metadata'], title="Info")
|
||||
else:
|
||||
return serve_template(templatename="info.html", metadata='', title="Info")
|
||||
return serve_template(templatename="info.html", data=None, title="Info")
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -544,9 +543,11 @@ class WebInterface(object):
|
|||
result = plex_watch.get_recently_watched(user, limit)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="user_recently_watched.html", recently_watched=result, title="Recently Watched")
|
||||
return serve_template(templatename="user_recently_watched.html", data=result,
|
||||
title="Recently Watched")
|
||||
else:
|
||||
return serve_template(templatename="user_recently_watched.html", recently_watched=None, title="Recently Watched")
|
||||
return serve_template(templatename="user_recently_watched.html", data=None,
|
||||
title="Recently Watched")
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -556,9 +557,9 @@ class WebInterface(object):
|
|||
result = plex_watch.get_user_watch_time_stats(user)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="user_watch_time_stats.html", watch_stats=result, title="Watch Stats")
|
||||
return serve_template(templatename="user_watch_time_stats.html", data=result, title="Watch Stats")
|
||||
else:
|
||||
return serve_template(templatename="user_watch_time_stats.html", watch_stats=None, title="Watch Stats")
|
||||
return serve_template(templatename="user_watch_time_stats.html", data=None, title="Watch Stats")
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -568,9 +569,10 @@ class WebInterface(object):
|
|||
result = plex_watch.get_user_platform_stats(user)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="user_platform_stats.html", platform_stats=result, title="Platform Stats")
|
||||
return serve_template(templatename="user_platform_stats.html", data=result,
|
||||
title="Platform Stats")
|
||||
else:
|
||||
return serve_template(templatename="user_platform_stats.html", platform_stats=None, title="Platform Stats")
|
||||
return serve_template(templatename="user_platform_stats.html", data=None, title="Platform Stats")
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
@ -580,9 +582,9 @@ class WebInterface(object):
|
|||
result = pms_connect.get_season_children(rating_key)
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="info_episode_list.html", episode_list=result, title="Episode List")
|
||||
return serve_template(templatename="info_episode_list.html", data=result, title="Episode List")
|
||||
else:
|
||||
return serve_template(templatename="info_episode_list.html", episode_list=None, title="Episode List")
|
||||
return serve_template(templatename="info_episode_list.html", data=None, title="Episode List")
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue