mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Initial library_id changes
* Give the library sections their own db table.
This commit is contained in:
parent
1de3c0d559
commit
09aac22909
12 changed files with 420 additions and 204 deletions
|
@ -60,49 +60,41 @@ DOCUMENTATION :: END
|
|||
% if data:
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
% if data['media_type'] != 'library':
|
||||
<div class="art-face" style="background-image:url(pms_image_proxy?img=${data['art']}&width=1920&height=1080)"></div>
|
||||
% endif
|
||||
<div class="summary-container">
|
||||
<div class="summary-navbar">
|
||||
<div class="col-md-12">
|
||||
<div class="summary-navbar-list">
|
||||
<ul class="list-unstyled breadcrumb">
|
||||
% if data['media_type'] == 'library':
|
||||
% if data['library'] == 'movie':
|
||||
<li class="active">Movies</li>
|
||||
% elif data['library'] == 'show':
|
||||
<li class="active">TV Shows</li>
|
||||
% elif data['library'] == 'artist':
|
||||
<li class="active">Music</li>
|
||||
% endif
|
||||
<li class="active">${data['title']}</li>
|
||||
% elif data['media_type'] == 'movie':
|
||||
<li><a href="info?item_id=movie">Movies</a></li>
|
||||
<li><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li class="active">${data['title']}</li>
|
||||
% elif data['media_type'] == 'show':
|
||||
<li><a href="info?item_id=show">TV Shows</a></li>
|
||||
<li><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li class="active">${data['title']}</li>
|
||||
% elif data['media_type'] == 'season':
|
||||
<li class="hidden-xs hidden-sm"><a href="info?item_id=show">TV Shows</a></li>
|
||||
<li class="hidden-xs hidden-sm"><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></li>
|
||||
<li class="active">Season ${data['index']}</li>
|
||||
<li class="active">Season ${data['media_index']}</li>
|
||||
% elif data['media_type'] == 'episode':
|
||||
<li class="hidden-xs hidden-sm"><a href="info?item_id=show">TV Shows</a></li>
|
||||
<li class="hidden-xs hidden-sm"><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li class="hidden-xs hidden-sm"><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></li>
|
||||
<li><a href="info?item_id=${data['parent_rating_key']}">Season ${data['parent_index']}</a></li>
|
||||
<li class="active">Episode ${data['index']} - ${data['title']}</li>
|
||||
<li><a href="info?item_id=${data['parent_rating_key']}">Season ${data['parent_media_index']}</a></li>
|
||||
<li class="active">Episode ${data['media_index']} - ${data['title']}</li>
|
||||
% elif data['media_type'] == 'artist':
|
||||
<li><a href="info?item_id=artist">Music</a></li>
|
||||
<li><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li class="active">${data['title']}</li>
|
||||
% elif data['media_type'] == 'album':
|
||||
<li class="hidden-xs hidden-sm"><a href="info?item_id=artist">Music</a></li>
|
||||
<li class="hidden-xs hidden-sm"><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></li>
|
||||
<li class="active">${data['title']}</li>
|
||||
% elif data['media_type'] == 'track':
|
||||
<li class="hidden-xs hidden-sm"><a href="info?item_id=artist">Music</a></li>
|
||||
<li class="hidden-xs hidden-sm"><a href="info?library_id=${data['library_id']}">${data['library_title']}</a></li>
|
||||
<li class="hidden-xs hidden-sm"><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></li>
|
||||
<li><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></li>
|
||||
<li class="active">Track ${data['index']} - ${data['title']}</li>
|
||||
<li class="active">Track ${data['media_index']} - ${data['title']}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -143,18 +135,18 @@ DOCUMENTATION :: END
|
|||
<h1> </h1><h1>${data['title']}</h1>
|
||||
% elif data['media_type'] == 'season':
|
||||
<h1> </h1><h1><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></h1>
|
||||
<h3 class="hidden-xs">S${data['index']}</h3>
|
||||
<h3 class="hidden-xs">S${data['media_index']}</h3>
|
||||
% elif data['media_type'] == 'episode':
|
||||
<h1><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></h1>
|
||||
<h2>${data['title']}</h2>
|
||||
<h3 class="hidden-xs">S${data['parent_index']} · E${data['index']}</h3>
|
||||
<h3 class="hidden-xs">S${data['parent_media_index']} · E${data['media_index']}</h3>
|
||||
% elif data['media_type'] == 'album':
|
||||
<h1><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></h1>
|
||||
<h2>${data['title']}</h2>
|
||||
% elif data['media_type'] == 'track':
|
||||
<h1><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></h1>
|
||||
<h2><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a> - ${data['title']}</h2>
|
||||
<h3 class="hidden-xs">T${data['index']}</h3>
|
||||
<h3 class="hidden-xs">T${data['media_index']}</h3>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
|
@ -315,6 +307,13 @@ DOCUMENTATION :: END
|
|||
% endif
|
||||
% endif
|
||||
<div class='col-md-12'>
|
||||
% if data['media_type'] == 'library' and config['update_library_ids'] == 1:
|
||||
<div id="update_library_ids_mssage" style="text-align: center; margin-top: 20px;">
|
||||
<i class="fa fa-refresh fa-spin"></i> Updating library ids in the database. This could take a few minutes depending on the size of your database.
|
||||
<br />
|
||||
The history table will refresh automatically when the update is complete. Please wait...
|
||||
</div>
|
||||
% endif
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span>Watch History for <strong>${data['title']}</strong></span>
|
||||
|
@ -417,21 +416,15 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-content-title-wrapper">
|
||||
<div class="col-md-12">
|
||||
<h4 style="text-align: center; margin-bottom: 20px;">
|
||||
Error retrieving item metadata. This media item is not available in the Plex Media Server library.
|
||||
</h4>
|
||||
% if query:
|
||||
<h4 style="text-align: center; margin-bottom: 20px;">
|
||||
If the item has been moved, please select the correct match below to update the PlexPy database.
|
||||
</h4>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-content-wrapper">
|
||||
<div class='col-md-12'>
|
||||
<div style="text-align: center; margin-top: 20px;">
|
||||
<i class="fa fa-exclamation-triangle"></i> Error retrieving item metadata. This media item is not available in the Plex Media Server library.
|
||||
</div>
|
||||
% if query:
|
||||
<div style="text-align: center; margin-top: 20px;">
|
||||
If the item has been moved, please select the correct match below to update the PlexPy database.
|
||||
</div>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span>Search Results for <strong>${query['query_string']}</strong></span>
|
||||
|
@ -507,10 +500,23 @@ DOCUMENTATION :: END
|
|||
type: 'post',
|
||||
data: function ( d ) {
|
||||
return { 'json_data': JSON.stringify( d ),
|
||||
'media_type': "${data['media_type_filter']}" };
|
||||
'library_id': "${data['library_id']}" };
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("${config['update_library_ids']}" == "1") {
|
||||
$.ajax({
|
||||
url: 'update_library_ids',
|
||||
type: 'post',
|
||||
cache: false,
|
||||
async: true,
|
||||
data: { },
|
||||
complete: function (xhr, status) {
|
||||
$('#update_library_ids_mssage').remove();
|
||||
history_table.draw();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
% elif data['media_type'] == 'show' or data['media_type'] == 'artist':
|
||||
<script>
|
||||
|
|
|
@ -18,7 +18,7 @@ data['children_list'] :: Usable paramaters
|
|||
|
||||
== Global keys ==
|
||||
rating_key Returns the unique identifier for the media item.
|
||||
index Returns the episode number.
|
||||
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.
|
||||
|
@ -47,7 +47,7 @@ DOCUMENTATION :: END
|
|||
% endif
|
||||
<div class="item-children-card-overlay">
|
||||
<div class="item-children-overlay-text">
|
||||
Season ${child['index']}
|
||||
Season ${child['media_index']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -57,7 +57,7 @@ DOCUMENTATION :: END
|
|||
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);">
|
||||
<div class="item-children-card-overlay">
|
||||
<div class="item-children-overlay-text">
|
||||
Episode ${child['index']}
|
||||
Episode ${child['media_index']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,7 +75,7 @@ DOCUMENTATION :: END
|
|||
% elif data['children_type'] == 'track':
|
||||
% if loop.index % 2 == 0:
|
||||
<div class="item-children-list-item-even">
|
||||
<span class="item-children-list-item-index">${child['index']}</span>
|
||||
<span class="item-children-list-item-index">${child['media_index']}</span>
|
||||
<span class="item-children-list-item-title">${child['title']}</span>
|
||||
<span class="item-children-list-item-duration" id="item-children-list-item-duration-${loop.index + 1}">
|
||||
<script>$('#item-children-list-item-duration-${loop.index + 1}').text(moment.utc(${child['duration']}).format("m:ss"));</script>
|
||||
|
@ -83,7 +83,7 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
% else:
|
||||
<div class="item-children-list-item-odd">
|
||||
<span class="item-children-list-item-index">${child['index']}</span>
|
||||
<span class="item-children-list-item-index">${child['media_index']}</span>
|
||||
<span class="item-children-list-item-title">${child['title']}</span>
|
||||
<span class="item-children-list-item-duration" id="item-children-list-item-duration-${loop.index + 1}">
|
||||
<script>$('#item-children-list-item-duration-${loop.index + 1}').text(moment.utc(${child['duration']}).format("m:ss"));</script>
|
||||
|
|
|
@ -35,8 +35,8 @@ duration Returns the standard runtime of the media.
|
|||
content_rating Returns the age rating for the media.
|
||||
summary Returns a brief description of the media plot.
|
||||
grandparent_title Returns the name of the show, or artist.
|
||||
parent_index Returns the index number of the season.
|
||||
index Returns the index number of the episode, or track.
|
||||
parent_media_index Returns the index number of the season.
|
||||
media_index Returns the index number of the episode, or track.
|
||||
parent_thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
writers Returns an array of writers.
|
||||
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
|
||||
|
@ -112,7 +112,7 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
<div class="item-children-instance-text-wrapper season-item">
|
||||
<h3 title="${child['parent_title']}">${child['parent_title']}</h3>
|
||||
<h3 class="text-muted">S${child['index']}</h3>
|
||||
<h3 class="text-muted">S${child['media_index']}</h3>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -135,7 +135,7 @@ DOCUMENTATION :: END
|
|||
<div class="item-children-instance-text-wrapper episode-item">
|
||||
<h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3>
|
||||
<h3 title="${child['title']}">${child['title']}</h3>
|
||||
<h3 class="text-muted">S${child['parent_index']} · E${child['index']}</h3>
|
||||
<h3 class="text-muted">S${child['parent_media_index']} · E${child['media_index']}</h3>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -199,7 +199,7 @@ DOCUMENTATION :: END
|
|||
<div class="item-children-poster-face album-poster" style="background-image: url(pms_image_proxy?img=${child['parent_thumb']}&width=300&height=300);">
|
||||
<div class="item-children-card-overlay">
|
||||
<div class="item-children-overlay-text">
|
||||
Track ${child['index']}
|
||||
Track ${child['media_index']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -39,7 +39,7 @@ DOCUMENTATION :: END
|
|||
<div class="home-platforms-instance-name">
|
||||
% if library['type'] != 'photo':
|
||||
<h4>
|
||||
<a href="info?item_id=${library['type']}" title="${library['rows']['title']}">${library['rows']['title']}</a>
|
||||
<a href="info?library_id=${library['rows']['key']}" title="${library['rows']['title']}">${library['rows']['title']}</a>
|
||||
</h4>
|
||||
% else:
|
||||
<h4>${library['rows']['title']}</h4>
|
||||
|
|
|
@ -50,7 +50,7 @@ DOCUMENTATION :: END
|
|||
% if item['type'] == 'episode':
|
||||
<h3 title="${item['grandparent_title']}">${item['grandparent_title']}</h3>
|
||||
<h3 title="${item['title']}">${item['title']}</h3>
|
||||
<h3 class="text-muted">S${item['parent_index']} · E${item['index']}</h3>
|
||||
<h3 class="text-muted">S${item['parent_media_index']} · E${item['media_index']}</h3>
|
||||
% elif item['type'] == 'movie':
|
||||
<h3 title="${item['title']}">${item['title']}</h3>
|
||||
<h3 class="text-muted">${item['year']}</h3>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue