mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Add collections info pages
This commit is contained in:
parent
28e4151157
commit
8b2bd5ce79
9 changed files with 380 additions and 50 deletions
|
@ -1808,7 +1808,8 @@ a:hover .summary-poster-face-track .summary-poster-face-overlay span {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
#children-list, #search-results-list {
|
.children-list,
|
||||||
|
.search-results-list {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
@ -1874,15 +1875,15 @@ a:hover .item-children-poster {
|
||||||
box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
|
box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
|
||||||
z-index: -2;
|
z-index: -2;
|
||||||
}
|
}
|
||||||
.item-children-poster-face.season-poster {
|
.item-children-poster-face.poster-item {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 225px;
|
height: 225px;
|
||||||
}
|
}
|
||||||
.item-children-poster-face.episode-poster {
|
.item-children-poster-face.episode-item {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
height: 140px;
|
height: 140px;
|
||||||
}
|
}
|
||||||
.item-children-poster-face.album-poster {
|
.item-children-poster-face.cover-item {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
@ -1915,15 +1916,13 @@ a:hover .item-children-poster {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
.item-children-instance-text-wrapper.season-item {
|
.item-children-instance-text-wrapper.poster-item,
|
||||||
|
.item-children-instance-text-wrapper.cover-item {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
.item-children-instance-text-wrapper.episode-item {
|
.item-children-instance-text-wrapper.episode-item {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
}
|
}
|
||||||
.item-children-instance-text-wrapper.album-item {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
.item-children-instance-text-wrapper h3 {
|
.item-children-instance-text-wrapper h3 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 5px 3px 0 3px;
|
padding: 5px 3px 0 3px;
|
||||||
|
|
|
@ -80,7 +80,7 @@ DOCUMENTATION :: END
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="summary-navbar-list">
|
<div class="summary-navbar-list">
|
||||||
<ul class="list-unstyled breadcrumb">
|
<ul class="list-unstyled breadcrumb">
|
||||||
% if data['media_type'] == 'movie':
|
% if data['media_type'] in ('movie', 'collection'):
|
||||||
<li><a href="library?section_id=${data['section_id']}">${data['library_name']}</a></li>
|
<li><a href="library?section_id=${data['section_id']}">${data['library_name']}</a></li>
|
||||||
<li class="active">${data['title']}</li>
|
<li class="active">${data['title']}</li>
|
||||||
% elif data['media_type'] == 'show':
|
% elif data['media_type'] == 'show':
|
||||||
|
@ -151,7 +151,7 @@ DOCUMENTATION :: END
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-content-title">
|
<div class="summary-content-title">
|
||||||
% if data['media_type'] in ('movie', 'show', 'artist'):
|
% if data['media_type'] in ('movie', 'show', 'artist', 'collection'):
|
||||||
<h1> </h1><h1>${data['title']}</h1>
|
<h1> </h1><h1>${data['title']}</h1>
|
||||||
% elif data['media_type'] == 'season':
|
% elif data['media_type'] == 'season':
|
||||||
<h1> </h1><h1><a href="info?rating_key=${data['parent_rating_key']}">${data['parent_title']}</a></h1>
|
<h1> </h1><h1><a href="info?rating_key=${data['parent_rating_key']}">${data['parent_title']}</a></h1>
|
||||||
|
@ -175,7 +175,7 @@ DOCUMENTATION :: END
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
% if data['media_type'] == 'movie':
|
% if data['media_type'] == 'movie':
|
||||||
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 305px;">
|
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 305px;">
|
||||||
% elif data['media_type'] == 'show' or data['media_type'] == 'season':
|
% elif data['media_type'] in ('show', 'season', 'collection'):
|
||||||
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 270px;">
|
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 270px;">
|
||||||
% elif data['media_type'] == 'episode':
|
% elif data['media_type'] == 'episode':
|
||||||
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 70px;">
|
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 70px;">
|
||||||
|
@ -235,6 +235,8 @@ DOCUMENTATION :: END
|
||||||
Aired <strong> <span id="airdate">${data['originally_available_at']}</span></strong>
|
Aired <strong> <span id="airdate">${data['originally_available_at']}</span></strong>
|
||||||
% elif data['media_type'] == 'album' or data['media_type'] == 'track':
|
% elif data['media_type'] == 'album' or data['media_type'] == 'track':
|
||||||
Released <strong> ${data['year']}</strong>
|
Released <strong> ${data['year']}</strong>
|
||||||
|
% elif data['media_type'] == 'collection':
|
||||||
|
Year <strong> ${data['min_year']} - ${data['max_year']}</strong>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-content-details-tag">
|
<div class="summary-content-details-tag">
|
||||||
|
@ -308,51 +310,65 @@ DOCUMENTATION :: END
|
||||||
</div>
|
</div>
|
||||||
% if data['media_type'] == 'show':
|
% if data['media_type'] == 'show':
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class="table-card-header">
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Season List for <strong>${data['title']}</strong></span>
|
<span>Season List for <strong>${data['title']}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class="table-card-back">
|
||||||
<div id="children-list"><i class="fa fa-refresh fa-spin"></i> Loading season list...</div>
|
<div id="children-list" class="children-list"><i class="fa fa-refresh fa-spin"></i> Loading season list...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% elif data['media_type'] == 'season':
|
% elif data['media_type'] == 'season':
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class="table-card-header">
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Episode List for <strong>${data['title']}</strong></span>
|
<span>Episode List for <strong>${data['title']}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class="table-card-back">
|
||||||
<div id="children-list"><i class="fa fa-refresh fa-spin"></i> Loading episode list...</div>
|
<div id="children-list" class="children-list"><i class="fa fa-refresh fa-spin"></i> Loading episode list...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% elif data['media_type'] == 'artist':
|
% elif data['media_type'] == 'artist':
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class="table-card-header">
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Album List for <strong>${data['title']}</strong></span>
|
<span>Album List for <strong>${data['title']}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class="table-card-back">
|
||||||
<div id="children-list"><i class="fa fa-refresh fa-spin"></i> Loading album list...</div>
|
<div id="children-list" class="children-list"><i class="fa fa-refresh fa-spin"></i> Loading album list...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% elif data['media_type'] == 'album':
|
% elif data['media_type'] == 'album':
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class="table-card-header">
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Track List for <strong>${data['title']}</strong></span>
|
<span>Track List for <strong>${data['title']}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class="table-card-back">
|
||||||
<div id="children-list"><i class="fa fa-refresh fa-spin"></i> Loading track list...</div>
|
<div id="children-list" class="children-list"><i class="fa fa-refresh fa-spin"></i> Loading track list...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% elif data['media_type'] == 'collection':
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="table-card-header">
|
||||||
|
<div class="header-bar">
|
||||||
|
<span>Movies in <strong>${data['title']}</strong> collection</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-card-back">
|
||||||
|
<div id="children-list" class="children-list"><i class="fa fa-refresh fa-spin"></i> Loading movies list...</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="collection-related-list-container" style="display: none;">
|
||||||
|
</div>
|
||||||
% endif
|
% endif
|
||||||
|
% if data['media_type'] != 'collection':
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class='table-card-header'>
|
<div class="table-card-header">
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
<span>Watch History for <strong>${data['title']}</strong></span>
|
<span>Watch History for <strong>${data['title']}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -420,6 +436,7 @@ DOCUMENTATION :: END
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -562,6 +579,7 @@ DOCUMENTATION :: END
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
|
% if data['media_type'] != 'collection':
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
get_history();
|
get_history();
|
||||||
|
@ -638,7 +656,8 @@ DOCUMENTATION :: END
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
% if data['media_type'] in ('show', 'season', 'artist', 'album'):
|
% endif
|
||||||
|
% if data['media_type'] in ('show', 'season', 'artist', 'album', 'collection'):
|
||||||
<script>
|
<script>
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'get_item_children',
|
url: 'get_item_children',
|
||||||
|
@ -646,7 +665,24 @@ DOCUMENTATION :: END
|
||||||
async: true,
|
async: true,
|
||||||
data: { rating_key : "${data['rating_key']}" },
|
data: { rating_key : "${data['rating_key']}" },
|
||||||
complete: function(xhr, status) {
|
complete: function(xhr, status) {
|
||||||
$("#children-list").html(xhr.responseText); }
|
$("#children-list").html(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
% endif
|
||||||
|
% if data['media_type'] == 'collection':
|
||||||
|
<script>
|
||||||
|
$.ajax({
|
||||||
|
url: 'get_item_children_related',
|
||||||
|
type: 'GET',
|
||||||
|
async: true,
|
||||||
|
data: {
|
||||||
|
rating_key : "${data['rating_key']}",
|
||||||
|
title: "${data['title']}"
|
||||||
|
},
|
||||||
|
complete: function(xhr, status) {
|
||||||
|
$("#collection-related-list-container").html(xhr.responseText).show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -37,13 +37,42 @@ DOCUMENTATION :: END
|
||||||
% else:
|
% else:
|
||||||
<li>
|
<li>
|
||||||
% endif
|
% endif
|
||||||
%if data['children_type'] == 'season':
|
% if data['children_type'] == 'movie':
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
|
||||||
|
<div class="item-children-poster">
|
||||||
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3 class="text-muted">${child['year']}</h3>
|
||||||
|
</div>
|
||||||
|
% elif data['children_type'] == 'show':
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
|
||||||
|
<div class="item-children-poster">
|
||||||
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
% elif data['children_type'] == 'season':
|
||||||
<a href="info?rating_key=${child['rating_key']}" title="Season ${child['media_index']}">
|
<a href="info?rating_key=${child['rating_key']}" title="Season ${child['media_index']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
% if child['thumb']:
|
% if child['thumb']:
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);">
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);">
|
||||||
% else:
|
% else:
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=450&fallback=poster);">
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=450&fallback=poster);">
|
||||||
% endif
|
% endif
|
||||||
<div class="item-children-card-overlay">
|
<div class="item-children-card-overlay">
|
||||||
<div class="item-children-overlay-text">
|
<div class="item-children-overlay-text">
|
||||||
|
@ -59,7 +88,7 @@ DOCUMENTATION :: END
|
||||||
% elif data['children_type'] == 'episode':
|
% elif data['children_type'] == 'episode':
|
||||||
<a href="info?rating_key=${child['rating_key']}" title="Episode ${child['media_index']}">
|
<a href="info?rating_key=${child['rating_key']}" title="Episode ${child['media_index']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=500&height=250&fallback=art);">
|
<div class="item-children-poster-face episode-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=500&height=250&fallback=art);">
|
||||||
<div class="item-children-card-overlay">
|
<div class="item-children-card-overlay">
|
||||||
<div class="item-children-overlay-text">
|
<div class="item-children-overlay-text">
|
||||||
Episode ${child['media_index']}
|
Episode ${child['media_index']}
|
||||||
|
@ -79,13 +108,13 @@ DOCUMENTATION :: END
|
||||||
% elif data['children_type'] == 'album':
|
% elif data['children_type'] == 'album':
|
||||||
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="item-children-poster-face cover-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="item-children-instance-text-wrapper album-item">
|
<div class="item-children-instance-text-wrapper cover-item">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
99
data/interfaces/default/info_collection_list.html
Normal file
99
data/interfaces/default/info_collection_list.html
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
<%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_collection_list.html
|
||||||
|
Version: 0.1
|
||||||
|
Variable names: data [list]
|
||||||
|
|
||||||
|
data :: Usable parameters
|
||||||
|
|
||||||
|
== Global keys ==
|
||||||
|
children_type Returns the type of children in the array.
|
||||||
|
children_count Returns the number of episodes in the array.
|
||||||
|
children_list Returns an array of episodes.
|
||||||
|
|
||||||
|
data['children_list'] :: Usable paramaters
|
||||||
|
|
||||||
|
== Global keys ==
|
||||||
|
rating_key Returns the unique identifier for the media item.
|
||||||
|
media_index Returns the episode number.
|
||||||
|
title Returns the name of the episode.
|
||||||
|
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||||
|
parent_thumb Returns the location of the item's parent thumbnail. Use with pms_image_proxy.
|
||||||
|
|
||||||
|
DOCUMENTATION :: END
|
||||||
|
</%doc>
|
||||||
|
|
||||||
|
% if data != None:
|
||||||
|
<%
|
||||||
|
types = ('movie', 'show', 'artist', 'album')
|
||||||
|
headers = {'movie': 'Movies',
|
||||||
|
'show': 'TV Shows',
|
||||||
|
'season': 'Seasons',
|
||||||
|
'episode': 'Episodes',
|
||||||
|
'artist': 'Artists',
|
||||||
|
'album': 'Albums',
|
||||||
|
'track': 'Tracks',
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
% for media_type in types:
|
||||||
|
% if data['results_list'][media_type]:
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="table-card-header">
|
||||||
|
<div class="header-bar">
|
||||||
|
<span>${headers[media_type]} in <strong>${title}</strong> collection</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-card-back">
|
||||||
|
<div id="children-list" class="children-list">
|
||||||
|
<div class="item-children-wrapper">
|
||||||
|
<ul class="item-children-instance list-unstyled">
|
||||||
|
% for child in data['results_list'][media_type]:
|
||||||
|
<li>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
|
||||||
|
<div class="item-children-poster">
|
||||||
|
% if media_type in ('artist', 'album'):
|
||||||
|
<div class="item-children-poster-face cover-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
|
% else:
|
||||||
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% endif
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
% if media_type == 'artist':
|
||||||
|
<div class="item-children-instance-text-wrapper cover-item">
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
% elif media_type == 'album':
|
||||||
|
<div class="item-children-instance-text-wrapper cover-item">
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['parent_rating_key']}" title="${child['parent_title']}">${child['parent_title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
% else:
|
||||||
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
|
<h3>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">${child['title']}</a>
|
||||||
|
</h3>
|
||||||
|
<h3 class="text-muted">${child['year']}</h3>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
</li>
|
||||||
|
% endfor
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
|
% endif
|
|
@ -54,6 +54,31 @@ DOCUMENTATION :: END
|
||||||
|
|
||||||
% if data != None:
|
% if data != None:
|
||||||
% if data['results_count'] > 0:
|
% if data['results_count'] > 0:
|
||||||
|
% if 'collection' in data['results_list'] and data['results_list']['collection']:
|
||||||
|
<div class="item-children-wrapper">
|
||||||
|
<div class="item-children-section-title">
|
||||||
|
<h4>Collections</h4>
|
||||||
|
</div>
|
||||||
|
<ul class="item-children-instance list-unstyled">
|
||||||
|
% for child in data['results_list']['collection']:
|
||||||
|
<li>
|
||||||
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
|
<div class="item-children-poster">
|
||||||
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
|
<h3 class="text-muted">${child['min_year']} - ${child['max_year']}</h3>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
% endfor
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
% if 'movie' in data['results_list'] and data['results_list']['movie']:
|
% if 'movie' in data['results_list'] and data['results_list']['movie']:
|
||||||
<div class="item-children-wrapper">
|
<div class="item-children-wrapper">
|
||||||
<div class="item-children-section-title">
|
<div class="item-children-section-title">
|
||||||
|
@ -64,12 +89,12 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper season-item">
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
<h3 class="text-muted">${child['year']}</h3>
|
<h3 class="text-muted">${child['year']}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,12 +114,12 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper season-item">
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
<h3 title="${child['title']}">${child['title']}</h3>
|
<h3 title="${child['title']}">${child['title']}</h3>
|
||||||
<h3 class="text-muted">${child['year']}</h3>
|
<h3 class="text-muted">${child['year']}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,12 +139,12 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450&fallback=poster);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="item-children-instance-text-wrapper season-item">
|
<div class="item-children-instance-text-wrapper poster-item">
|
||||||
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
||||||
<h3 class="text-muted">S${child['media_index']}</h3>
|
<h3 class="text-muted">S${child['media_index']}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,7 +164,7 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=500&height=250&fallback=art);"></div>
|
<div class="item-children-poster-face episode-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=500&height=250&fallback=art);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
|
@ -165,7 +190,7 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="item-children-poster-face cover-item style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
|
@ -189,7 +214,7 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="item-children-poster-face cover-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
|
@ -214,7 +239,7 @@ DOCUMENTATION :: END
|
||||||
<li>
|
<li>
|
||||||
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
<a href="info?rating_key=${child['rating_key']}" id="${child['rating_key']}">
|
||||||
<div class="item-children-poster">
|
<div class="item-children-poster">
|
||||||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=300&fallback=cover);">
|
<div class="item-children-poster-face cover-item" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=300&fallback=cover);">
|
||||||
<div class="item-children-card-overlay">
|
<div class="item-children-card-overlay">
|
||||||
<div class="item-children-overlay-text">
|
<div class="item-children-overlay-text">
|
||||||
Track ${child['media_index']}
|
Track ${child['media_index']}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='table-card-back'>
|
<div class='table-card-back'>
|
||||||
<div id="search-results-list"><i class="fa fa-refresh fa-spin"></i> Loading search results...</div>
|
<div id="search-results-list" class="search-results-list"><i class="fa fa-refresh fa-spin"></i> Loading search results...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ class DataFactory(object):
|
||||||
if str(rating_key).isdigit():
|
if str(rating_key).isdigit():
|
||||||
poster_key = rating_key
|
poster_key = rating_key
|
||||||
elif metadata:
|
elif metadata:
|
||||||
if metadata['media_type'] in ('movie', 'show', 'artist'):
|
if metadata['media_type'] in ('movie', 'show', 'artist', 'collection'):
|
||||||
poster_key = metadata['rating_key']
|
poster_key = metadata['rating_key']
|
||||||
elif metadata['media_type'] in ('season', 'album'):
|
elif metadata['media_type'] in ('season', 'album'):
|
||||||
poster_key = metadata['rating_key']
|
poster_key = metadata['rating_key']
|
||||||
|
|
|
@ -257,6 +257,23 @@ class PmsConnect(object):
|
||||||
|
|
||||||
return request
|
return request
|
||||||
|
|
||||||
|
def get_children_list_related(self, rating_key='', output_format=''):
|
||||||
|
"""
|
||||||
|
Return list of related children in requested collection item.
|
||||||
|
|
||||||
|
Parameters required: rating_key { ratingKey of parent }
|
||||||
|
Optional parameters: output_format { dict, json }
|
||||||
|
|
||||||
|
Output: array
|
||||||
|
"""
|
||||||
|
uri = '/hubs/metadata/' + rating_key + '/related'
|
||||||
|
request = self.request_handler.make_request(uri=uri,
|
||||||
|
proto=self.protocol,
|
||||||
|
request_type='GET',
|
||||||
|
output_format=output_format)
|
||||||
|
|
||||||
|
return request
|
||||||
|
|
||||||
def get_childrens_list(self, rating_key='', output_format=''):
|
def get_childrens_list(self, rating_key='', output_format=''):
|
||||||
"""
|
"""
|
||||||
Return list of children in requested library item.
|
Return list of children in requested library item.
|
||||||
|
@ -414,7 +431,7 @@ class PmsConnect(object):
|
||||||
|
|
||||||
Output: array
|
Output: array
|
||||||
"""
|
"""
|
||||||
uri = '/hubs/search?query=' + urllib.quote(query.encode('utf8')) + '&limit=' + limit
|
uri = '/hubs/search?query=' + urllib.quote(query.encode('utf8')) + '&limit=' + limit + '&includeCollections=1'
|
||||||
request = self.request_handler.make_request(uri=uri,
|
request = self.request_handler.make_request(uri=uri,
|
||||||
proto=self.protocol,
|
proto=self.protocol,
|
||||||
request_type='GET',
|
request_type='GET',
|
||||||
|
@ -607,7 +624,7 @@ class PmsConnect(object):
|
||||||
try:
|
try:
|
||||||
xml_head = metadata.getElementsByTagName('MediaContainer')
|
xml_head = metadata.getElementsByTagName('MediaContainer')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn(u"Tautulli Pmsconnect :: Unable to parse XML for get_metadata: %s." % e)
|
logger.warn(u"Tautulli Pmsconnect :: Unable to parse XML for get_metadata_details: %s." % e)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
metadata = {}
|
metadata = {}
|
||||||
|
@ -1039,6 +1056,50 @@ class PmsConnect(object):
|
||||||
helpers.get_xml_attr(metadata_main, 'title'))
|
helpers.get_xml_attr(metadata_main, 'title'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elif metadata_type == 'collection':
|
||||||
|
metadata = {'media_type': metadata_type,
|
||||||
|
'sub_media_type': helpers.get_xml_attr(metadata_main, 'subtype'),
|
||||||
|
'section_id': section_id,
|
||||||
|
'library_name': library_name,
|
||||||
|
'rating_key': helpers.get_xml_attr(metadata_main, 'ratingKey'),
|
||||||
|
'parent_rating_key': helpers.get_xml_attr(metadata_main, 'parentRatingKey'),
|
||||||
|
'grandparent_rating_key': helpers.get_xml_attr(metadata_main, 'grandparentRatingKey'),
|
||||||
|
'title': helpers.get_xml_attr(metadata_main, 'title'),
|
||||||
|
'parent_title': helpers.get_xml_attr(metadata_main, 'parentTitle'),
|
||||||
|
'grandparent_title': helpers.get_xml_attr(metadata_main, 'grandparentTitle'),
|
||||||
|
'sort_title': helpers.get_xml_attr(metadata_main, 'titleSort'),
|
||||||
|
'media_index': helpers.get_xml_attr(metadata_main, 'index'),
|
||||||
|
'parent_media_index': helpers.get_xml_attr(metadata_main, 'parentIndex'),
|
||||||
|
'studio': helpers.get_xml_attr(metadata_main, 'studio'),
|
||||||
|
'content_rating': helpers.get_xml_attr(metadata_main, 'contentRating'),
|
||||||
|
'summary': helpers.get_xml_attr(metadata_main, 'summary'),
|
||||||
|
'tagline': helpers.get_xml_attr(metadata_main, 'tagline'),
|
||||||
|
'rating': helpers.get_xml_attr(metadata_main, 'rating'),
|
||||||
|
'audience_rating': helpers.get_xml_attr(metadata_main, 'audienceRating'),
|
||||||
|
'user_rating': helpers.get_xml_attr(metadata_main, 'userRating'),
|
||||||
|
'duration': helpers.get_xml_attr(metadata_main, 'duration'),
|
||||||
|
'year': helpers.get_xml_attr(metadata_main, 'year'),
|
||||||
|
'min_year': helpers.get_xml_attr(metadata_main, 'minYear'),
|
||||||
|
'max_year': helpers.get_xml_attr(metadata_main, 'maxYear'),
|
||||||
|
'thumb': helpers.get_xml_attr(metadata_main, 'thumb').split('?')[0],
|
||||||
|
'parent_thumb': helpers.get_xml_attr(metadata_main, 'parentThumb'),
|
||||||
|
'grandparent_thumb': helpers.get_xml_attr(metadata_main, 'grandparentThumb'),
|
||||||
|
'art': helpers.get_xml_attr(metadata_main, 'art'),
|
||||||
|
'banner': helpers.get_xml_attr(metadata_main, 'banner'),
|
||||||
|
'originally_available_at': helpers.get_xml_attr(metadata_main, 'originallyAvailableAt'),
|
||||||
|
'added_at': helpers.get_xml_attr(metadata_main, 'addedAt'),
|
||||||
|
'updated_at': helpers.get_xml_attr(metadata_main, 'updatedAt'),
|
||||||
|
'last_viewed_at': helpers.get_xml_attr(metadata_main, 'lastViewedAt'),
|
||||||
|
'guid': helpers.get_xml_attr(metadata_main, 'guid'),
|
||||||
|
'child_count': helpers.get_xml_attr(metadata_main, 'childCount'),
|
||||||
|
'directors': directors,
|
||||||
|
'writers': writers,
|
||||||
|
'actors': actors,
|
||||||
|
'genres': genres,
|
||||||
|
'labels': labels,
|
||||||
|
'full_title': helpers.get_xml_attr(metadata_main, 'title')
|
||||||
|
}
|
||||||
|
|
||||||
elif metadata_type == 'clip':
|
elif metadata_type == 'clip':
|
||||||
metadata = {'media_type': metadata_type,
|
metadata = {'media_type': metadata_type,
|
||||||
'section_id': section_id,
|
'section_id': section_id,
|
||||||
|
@ -1795,7 +1856,6 @@ class PmsConnect(object):
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def get_item_children(self, rating_key=''):
|
def get_item_children(self, rating_key=''):
|
||||||
"""
|
"""
|
||||||
Return processed and validated children list.
|
Return processed and validated children list.
|
||||||
|
@ -1836,8 +1896,11 @@ class PmsConnect(object):
|
||||||
for result in result_data:
|
for result in result_data:
|
||||||
children_output = {'section_id': section_id,
|
children_output = {'section_id': section_id,
|
||||||
'rating_key': helpers.get_xml_attr(result, 'ratingKey'),
|
'rating_key': helpers.get_xml_attr(result, 'ratingKey'),
|
||||||
|
'parent_rating_key': helpers.get_xml_attr(result, 'parentRatingKey'),
|
||||||
'media_index': helpers.get_xml_attr(result, 'index'),
|
'media_index': helpers.get_xml_attr(result, 'index'),
|
||||||
'title': helpers.get_xml_attr(result, 'title'),
|
'title': helpers.get_xml_attr(result, 'title'),
|
||||||
|
'parent_title': helpers.get_xml_attr(result, 'parentTitle'),
|
||||||
|
'year': helpers.get_xml_attr(result, 'year'),
|
||||||
'thumb': helpers.get_xml_attr(result, 'thumb'),
|
'thumb': helpers.get_xml_attr(result, 'thumb'),
|
||||||
'parent_thumb': helpers.get_xml_attr(a, 'thumb'),
|
'parent_thumb': helpers.get_xml_attr(a, 'thumb'),
|
||||||
'duration': helpers.get_xml_attr(result, 'duration')
|
'duration': helpers.get_xml_attr(result, 'duration')
|
||||||
|
@ -1852,6 +1915,72 @@ class PmsConnect(object):
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
def get_item_children_related(self, rating_key=''):
|
||||||
|
"""
|
||||||
|
Return processed and validated children list.
|
||||||
|
|
||||||
|
Output: array
|
||||||
|
"""
|
||||||
|
children_data = self.get_children_list_related(rating_key, output_format='xml')
|
||||||
|
|
||||||
|
try:
|
||||||
|
xml_head = children_data.getElementsByTagName('MediaContainer')
|
||||||
|
except Exception as e:
|
||||||
|
logger.warn(u"Tautulli Pmsconnect :: Unable to parse XML for get_item_children_related: %s." % e)
|
||||||
|
return []
|
||||||
|
|
||||||
|
children_results_list = {'movie': [],
|
||||||
|
'show': [],
|
||||||
|
'season': [],
|
||||||
|
'episode': [],
|
||||||
|
'artist': [],
|
||||||
|
'album': [],
|
||||||
|
'track': [],
|
||||||
|
}
|
||||||
|
|
||||||
|
for a in xml_head:
|
||||||
|
section_id = helpers.get_xml_attr(a, 'librarySectionID')
|
||||||
|
hubs = a.getElementsByTagName('Hub')
|
||||||
|
|
||||||
|
for h in hubs:
|
||||||
|
size = helpers.get_xml_attr(h, 'size')
|
||||||
|
media_type = helpers.get_xml_attr(h, 'type')
|
||||||
|
title = helpers.get_xml_attr(h, 'title')
|
||||||
|
hub_identifier = helpers.get_xml_attr(h, 'hubIdentifier')
|
||||||
|
|
||||||
|
if size == '0' or not hub_identifier.startswith('collection.related') or \
|
||||||
|
media_type not in children_results_list.keys():
|
||||||
|
continue
|
||||||
|
|
||||||
|
result_data = []
|
||||||
|
|
||||||
|
if h.getElementsByTagName('Video'):
|
||||||
|
result_data = h.getElementsByTagName('Video')
|
||||||
|
if h.getElementsByTagName('Directory'):
|
||||||
|
result_data = h.getElementsByTagName('Directory')
|
||||||
|
if h.getElementsByTagName('Track'):
|
||||||
|
result_data = h.getElementsByTagName('Track')
|
||||||
|
|
||||||
|
for result in result_data:
|
||||||
|
children_output = {'section_id': section_id,
|
||||||
|
'rating_key': helpers.get_xml_attr(result, 'ratingKey'),
|
||||||
|
'parent_rating_key': helpers.get_xml_attr(result, 'parentRatingKey'),
|
||||||
|
'media_index': helpers.get_xml_attr(result, 'index'),
|
||||||
|
'title': helpers.get_xml_attr(result, 'title'),
|
||||||
|
'parent_title': helpers.get_xml_attr(result, 'parentTitle'),
|
||||||
|
'year': helpers.get_xml_attr(result, 'year'),
|
||||||
|
'thumb': helpers.get_xml_attr(result, 'thumb'),
|
||||||
|
'parent_thumb': helpers.get_xml_attr(a, 'thumb'),
|
||||||
|
'duration': helpers.get_xml_attr(result, 'duration')
|
||||||
|
}
|
||||||
|
children_results_list[media_type].append(children_output)
|
||||||
|
|
||||||
|
output = {'results_count': sum(len(s) for s in children_results_list.items()),
|
||||||
|
'results_list': children_results_list,
|
||||||
|
}
|
||||||
|
|
||||||
|
return output
|
||||||
|
|
||||||
def get_servers_info(self):
|
def get_servers_info(self):
|
||||||
"""
|
"""
|
||||||
Return the list of local servers.
|
Return the list of local servers.
|
||||||
|
@ -2237,7 +2366,8 @@ class PmsConnect(object):
|
||||||
'episode': [],
|
'episode': [],
|
||||||
'artist': [],
|
'artist': [],
|
||||||
'album': [],
|
'album': [],
|
||||||
'track': []
|
'track': [],
|
||||||
|
'collection': []
|
||||||
}
|
}
|
||||||
|
|
||||||
for a in xml_head:
|
for a in xml_head:
|
||||||
|
|
|
@ -3588,7 +3588,7 @@ class WebInterface(object):
|
||||||
def get_item_children(self, rating_key='', **kwargs):
|
def get_item_children(self, rating_key='', **kwargs):
|
||||||
|
|
||||||
pms_connect = pmsconnect.PmsConnect()
|
pms_connect = pmsconnect.PmsConnect()
|
||||||
result = pms_connect.get_item_children(rating_key)
|
result = pms_connect.get_item_children(rating_key=rating_key)
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
return serve_template(templatename="info_children_list.html", data=result, title="Children List")
|
return serve_template(templatename="info_children_list.html", data=result, title="Children List")
|
||||||
|
@ -3596,6 +3596,18 @@ class WebInterface(object):
|
||||||
logger.warn(u"Unable to retrieve data for get_item_children.")
|
logger.warn(u"Unable to retrieve data for get_item_children.")
|
||||||
return serve_template(templatename="info_children_list.html", data=None, title="Children List")
|
return serve_template(templatename="info_children_list.html", data=None, title="Children List")
|
||||||
|
|
||||||
|
@cherrypy.expose
|
||||||
|
@requireAuth()
|
||||||
|
def get_item_children_related(self, rating_key='', title='', **kwargs):
|
||||||
|
|
||||||
|
pms_connect = pmsconnect.PmsConnect()
|
||||||
|
result = pms_connect.get_item_children_related(rating_key=rating_key)
|
||||||
|
|
||||||
|
if result:
|
||||||
|
return serve_template(templatename="info_collection_list.html", data=result, title=title)
|
||||||
|
else:
|
||||||
|
return serve_template(templatename="info_collection_list.html", data=None, title=title)
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@cherrypy.tools.json_out()
|
@cherrypy.tools.json_out()
|
||||||
@requireAuth()
|
@requireAuth()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue