mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
filled genre/studio pages
This commit is contained in:
parent
b90eabc00a
commit
62ee9f124c
8 changed files with 144 additions and 9 deletions
|
@ -325,7 +325,7 @@
|
||||||
return '<div class="posterRibbon">' + item.RecentlyAddedItemCount + ' New</div>';
|
return '<div class="posterRibbon">' + item.RecentlyAddedItemCount + ' New</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.IsFolder) {
|
if (!item.IsFolder && item.Type !== "Genre" && item.Type !== "Studio" && item.Type !== "Person") {
|
||||||
|
|
||||||
var date = item.DateCreated;
|
var date = item.DateCreated;
|
||||||
|
|
||||||
|
|
|
@ -1 +1,60 @@
|
||||||
|
(function ($, document) {
|
||||||
|
|
||||||
|
// The base query options
|
||||||
|
var query = {
|
||||||
|
|
||||||
|
SortBy: "SortName",
|
||||||
|
SortOrder: "Ascending",
|
||||||
|
IncludeItemTypes: "Movie",
|
||||||
|
Recursive: true,
|
||||||
|
Fields: "PrimaryImageAspectRatio,ItemCounts,DateCreated,UserData",
|
||||||
|
Limit: LibraryBrowser.getDetaultPageSize(),
|
||||||
|
StartIndex: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
function reloadItems(page) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
var showPaging = result.TotalRecordCount > query.Limit;
|
||||||
|
|
||||||
|
if (showPaging) {
|
||||||
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||||
|
items: result.Items,
|
||||||
|
useAverageAspectRatio: true,
|
||||||
|
countNameSingular: "Movie",
|
||||||
|
countNamePlural: "Movies"
|
||||||
|
});
|
||||||
|
|
||||||
|
if (showPaging) {
|
||||||
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
var elem = $('#items', page).html(html).trigger('create');
|
||||||
|
|
||||||
|
$('select', elem).on('change', function () {
|
||||||
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('pagebeforeshow', "#movieStudiosPage", function () {
|
||||||
|
|
||||||
|
reloadItems(this);
|
||||||
|
|
||||||
|
}).on('pageshow', "#movieStudiosPage", function () {
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery, document);
|
|
@ -1 +1,60 @@
|
||||||
|
(function ($, document) {
|
||||||
|
|
||||||
|
// The base query options
|
||||||
|
var query = {
|
||||||
|
|
||||||
|
SortBy: "SortName",
|
||||||
|
SortOrder: "Ascending",
|
||||||
|
IncludeItemTypes: "Series",
|
||||||
|
Recursive: true,
|
||||||
|
Fields: "PrimaryImageAspectRatio,ItemCounts,DateCreated,UserData",
|
||||||
|
Limit: LibraryBrowser.getDetaultPageSize(),
|
||||||
|
StartIndex: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
function reloadItems(page) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
var showPaging = result.TotalRecordCount > query.Limit;
|
||||||
|
|
||||||
|
if (showPaging) {
|
||||||
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||||
|
items: result.Items,
|
||||||
|
useAverageAspectRatio: true,
|
||||||
|
countNameSingular: "Show",
|
||||||
|
countNamePlural: "Shows"
|
||||||
|
});
|
||||||
|
|
||||||
|
if (showPaging) {
|
||||||
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
var elem = $('#items', page).html(html).trigger('create');
|
||||||
|
|
||||||
|
$('select', elem).on('change', function () {
|
||||||
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('pagebeforeshow', "#tvStudiosPage", function () {
|
||||||
|
|
||||||
|
reloadItems(this);
|
||||||
|
|
||||||
|
}).on('pageshow', "#tvStudiosPage", function () {
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery, document);
|
|
@ -13,6 +13,7 @@
|
||||||
<a href="tvshows.html" data-role="button">Shows</a>
|
<a href="tvshows.html" data-role="button">Shows</a>
|
||||||
<a href="tvgenres.html" data-role="button" class="ui-btn-active">Genres</a>
|
<a href="tvgenres.html" data-role="button" class="ui-btn-active">Genres</a>
|
||||||
<a href="#" data-role="button">Actors</a>
|
<a href="#" data-role="button">Actors</a>
|
||||||
|
<a href="tvstudios.html" data-role="button">Networks</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="viewSettings">
|
<div class="viewSettings">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<a href="tvshows.html" data-role="button">Shows</a>
|
<a href="tvshows.html" data-role="button">Shows</a>
|
||||||
<a href="tvgenres.html" data-role="button">Genres</a>
|
<a href="tvgenres.html" data-role="button">Genres</a>
|
||||||
<a href="#" data-role="button">Actors</a>
|
<a href="#" data-role="button">Actors</a>
|
||||||
|
<a href="tvstudios.html" data-role="button">Networks</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="ehsContent">
|
<div class="ehsContent">
|
||||||
<h1 class="listHeader firstListHeader">Latest Unwatched Episodes</h1>
|
<h1 class="listHeader firstListHeader">Latest Unwatched Episodes</h1>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<a href="tvshows.html" data-role="button" class="ui-btn-active">Shows</a>
|
<a href="tvshows.html" data-role="button" class="ui-btn-active">Shows</a>
|
||||||
<a href="tvgenres.html" data-role="button">Genres</a>
|
<a href="tvgenres.html" data-role="button">Genres</a>
|
||||||
<a href="#" data-role="button">Actors</a>
|
<a href="#" data-role="button">Actors</a>
|
||||||
|
<a href="tvstudios.html" data-role="button">Networks</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailPagePrimaryInfo">
|
<div class="detailPagePrimaryInfo">
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<a href="tvshows.html" data-role="button" class="ui-btn-active">Shows</a>
|
<a href="tvshows.html" data-role="button" class="ui-btn-active">Shows</a>
|
||||||
<a href="tvgenres.html" data-role="button">Genres</a>
|
<a href="tvgenres.html" data-role="button">Genres</a>
|
||||||
<a href="#" data-role="button">Actors</a>
|
<a href="#" data-role="button">Actors</a>
|
||||||
|
<a href="tvstudios.html" data-role="button">Networks</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="viewSettings">
|
<div class="viewSettings">
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
|
|
|
@ -1,11 +1,24 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<title>Media Browser</title>
|
||||||
<title></title>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="tvStudiosPage" data-role="page" class="page libraryPage noLogoPage listPage" data-theme="a">
|
||||||
|
<h1 class="libraryPageHeader"><a href="index.html" class="imageLink">
|
||||||
|
<img src="css/images/home.png"></a>TV Shows</h1>
|
||||||
|
<div data-role="content">
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||||
|
<a href="tvrecommended.html" data-role="button">Suggested</a>
|
||||||
|
<a href="tvshows.html" data-role="button">Shows</a>
|
||||||
|
<a href="tvgenres.html" data-role="button">Genres</a>
|
||||||
|
<a href="#" data-role="button">Actors</a>
|
||||||
|
<a href="tvstudios.html" data-role="button" class="ui-btn-active">Networks</a>
|
||||||
|
</div>
|
||||||
|
<div class="viewSettings">
|
||||||
|
</div>
|
||||||
|
<div id="items"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue