mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Add season list to show page, and watch history to season page
This commit is contained in:
parent
53830a7711
commit
60380c6a99
7 changed files with 329 additions and 72 deletions
|
@ -1008,17 +1008,102 @@ a .summary-poster-face-episode:hover {
|
|||
background-size: contain;
|
||||
height: 16px;
|
||||
}
|
||||
.show-seasons-wrapper {
|
||||
}
|
||||
.show-seasons-instance {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
.show-seasons-instance li {
|
||||
float: left;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
margin-right: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
a .show-seasons-card-overlay:hover {
|
||||
webkit-box-shadow: inset 0 0 0 2px #e9a049;
|
||||
-moz-box-shadow: inset 0 0 0 2px #e9a049;
|
||||
box-shadow: inset 0 0 0 2px #e9a049;
|
||||
}
|
||||
.show-seasons-poster {
|
||||
float: left;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
}
|
||||
.show-seasons-card-overlay {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: left;
|
||||
background: -moz-linear-gradient(top, rgba(0,0,0,0) 30%, rgba(0,0,0,1) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1)));
|
||||
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
|
||||
background: -o-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
|
||||
height: 225px;
|
||||
}
|
||||
.show-seasons-overlay-text {
|
||||
color: #aaa;
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
bottom: 5px;
|
||||
}
|
||||
.show-seasons-instance-text-wrapper {
|
||||
width: 150px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 20px;
|
||||
clear: both;
|
||||
}
|
||||
.show-seasons-instance-text-wrapper h3 {
|
||||
padding: 5px 3px 0 3px;
|
||||
color: #fff;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
font-size: 13px;
|
||||
margin: 0;
|
||||
line-height: 15px;
|
||||
font-weight: normal;
|
||||
width: 250px;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
clear: both;
|
||||
}
|
||||
.show-seasons-title a {
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
float: left;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
width: 205px;
|
||||
margin-top: 2px;
|
||||
margin-left: 0px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.show-seasons a:hover {
|
||||
color: #F9AA03;
|
||||
}
|
||||
.season-episodes-wrapper {
|
||||
}
|
||||
.season-episodes-instance {
|
||||
list-style: none;
|
||||
margin: 0 0 0px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
.season-episodes-instance li {
|
||||
float: left;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
margin-right: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
a .season-episodes-card-overlay:hover {
|
||||
webkit-box-shadow: inset 0 0 0 2px #e9a049;
|
||||
|
@ -1059,11 +1144,13 @@ a .season-episodes-card-overlay:hover {
|
|||
font-size: 11px;
|
||||
text-shadow: 0 1px 5px rgba(0,0,0,0.2);
|
||||
}
|
||||
.season-episodes-instance-text-wrapper {
|
||||
width: 250px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 20px;
|
||||
clear: both;
|
||||
.season-episodes-overlay-text {
|
||||
color: #aaa;
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
bottom: 5px;
|
||||
}
|
||||
.season-episodes-instance-text-wrapper h3 {
|
||||
padding: 5px 3px 0 3px;
|
||||
|
@ -1098,14 +1185,6 @@ a .season-episodes-card-overlay:hover {
|
|||
.season-episodes a:hover {
|
||||
color: #F9AA03;
|
||||
}
|
||||
.season-episodes-season {
|
||||
color: #aaa;
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
bottom: 5px;
|
||||
}
|
||||
.user-info-wrapper {
|
||||
height: 113px;
|
||||
}
|
||||
|
|
|
@ -197,7 +197,30 @@ DOCUMENTATION :: END
|
|||
% endif
|
||||
</div>
|
||||
</div>
|
||||
% if data['type'] == 'movie' or data['type'] == 'episode' or data['type'] == 'show':
|
||||
% if data['type'] == 'show':
|
||||
<div class='col-md-12'>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span>Season List for <strong>${data['title']}</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
<div id="season-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
% elif data['type'] == 'season':
|
||||
<div class='col-md-12'>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span>Episode List for <strong>${data['title']}</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
<div id="episode-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
% if data['type'] == 'movie' or data['type'] == 'episode' or data['type'] == 'show' or data['type'] == 'season':
|
||||
<div class='col-md-12'>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
|
@ -233,18 +256,7 @@ DOCUMENTATION :: END
|
|||
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
|
||||
</div>
|
||||
</div>
|
||||
% elif data['type'] == 'season':
|
||||
<div class='col-md-12'>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span>Episode List for <strong>${data['title']}</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-card-back'>
|
||||
<div id="episode-list"></div>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -288,28 +300,27 @@ DOCUMENTATION :: END
|
|||
type: 'post',
|
||||
data: function ( d ) {
|
||||
return { 'json_data': JSON.stringify( d ),
|
||||
'rating_key': ${data['rating_key']}
|
||||
};
|
||||
}
|
||||
}
|
||||
'rating_key': ${data['rating_key']} };
|
||||
}
|
||||
}
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#row-edit-mode').click(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).addClass('hidden');
|
||||
});
|
||||
} else {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).removeClass('hidden');
|
||||
});
|
||||
}
|
||||
});
|
||||
$('#row-edit-mode').click(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).addClass('hidden');
|
||||
});
|
||||
} else {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).removeClass('hidden');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
% elif data['type'] == 'show':
|
||||
|
@ -321,40 +332,75 @@ DOCUMENTATION :: END
|
|||
type: 'post',
|
||||
data: function ( d ) {
|
||||
return { 'json_data': JSON.stringify( d ),
|
||||
'grandparent_rating_key': ${data['rating_key']}
|
||||
};
|
||||
}
|
||||
}
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#row-edit-mode').click(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).addClass('hidden');
|
||||
});
|
||||
} else {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).removeClass('hidden');
|
||||
});
|
||||
'grandparent_rating_key': ${data['rating_key']} };
|
||||
}
|
||||
}
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#row-edit-mode').click(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).addClass('hidden');
|
||||
});
|
||||
} else {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).removeClass('hidden');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
$.ajax({
|
||||
url: 'get_show_children',
|
||||
type: "GET",
|
||||
async: true,
|
||||
data: { rating_key : ${data['rating_key']} },
|
||||
complete: function(xhr, status) {
|
||||
$("#season-list").html(xhr.responseText); }
|
||||
});
|
||||
</script>
|
||||
% endif
|
||||
% if data['type'] == 'season':
|
||||
<script src="interfaces/default/js/tables/history_table.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
history_table_options.ajax = {
|
||||
"url": "get_history",
|
||||
type: 'post',
|
||||
data: function ( d ) {
|
||||
return { 'json_data': JSON.stringify( d ),
|
||||
'parent_rating_key': ${data['rating_key']} };
|
||||
}
|
||||
}
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#row-edit-mode').click(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).addClass('hidden');
|
||||
});
|
||||
} else {
|
||||
$('.delete-control').each(function() {
|
||||
$(this).removeClass('hidden');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: 'get_children',
|
||||
url: 'get_season_children',
|
||||
type: "GET",
|
||||
async: true,
|
||||
data: { rating_key : ${data['rating_key']} },
|
||||
complete: function(xhr, status) {
|
||||
$("#episode-list").html(xhr.responseText);
|
||||
}
|
||||
complete: function(xhr, status) {
|
||||
$("#episode-list").html(xhr.responseText); }
|
||||
});
|
||||
</script>
|
||||
% endif
|
||||
|
|
|
@ -34,7 +34,7 @@ DOCUMENTATION :: END
|
|||
<div class="season-episodes-poster">
|
||||
<div class="season-episodes-poster-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=280);">
|
||||
<div class="season-episodes-card-overlay">
|
||||
<div class="season-episodes-season">
|
||||
<div class="season-episodes-overlay-text">
|
||||
Episode ${a['index']}
|
||||
</div>
|
||||
</div>
|
||||
|
|
55
data/interfaces/default/info_season_list.html
Normal file
55
data/interfaces/default/info_season_list.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
<%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_season_list.html
|
||||
Version: 0.1
|
||||
Variable names: data [list]
|
||||
|
||||
data :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
season_count Returns the number of seasons in the array.
|
||||
season_list Returns an array of seasons.
|
||||
|
||||
data['season_list'] :: Usable paramaters
|
||||
|
||||
== Global keys ==
|
||||
rating_key Returns the unique identifier for the media item.
|
||||
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
title Returns the name of the season.
|
||||
index Returns the season number.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data != None:
|
||||
% if data['season_count'] > 0:
|
||||
<div class="show-seasons-wrapper">
|
||||
<ul class="show-seasons-instance list-unstyled">
|
||||
% for a in data['season_list']:
|
||||
% if a['rating_key']:
|
||||
<li>
|
||||
<a href="info?item_id=${a['rating_key']}">
|
||||
<div class="show-seasons-poster">
|
||||
% if a['thumb']:
|
||||
<div class="poster-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=450);">
|
||||
% else:
|
||||
<div class="poster-face" style="background-image: url(pms_image_proxy?img=${a['parent_thumb']}&width=300&height=450);">
|
||||
% endif
|
||||
<div class="show-seasons-card-overlay">
|
||||
<div class="show-seasons-overlay-text">
|
||||
Season ${a['index']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
% endif
|
||||
% endif
|
Loading…
Add table
Add a link
Reference in a new issue