mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added a virtual season image provider
This commit is contained in:
parent
9b7f81c3c6
commit
3360897d0a
6 changed files with 52 additions and 56 deletions
|
@ -168,6 +168,13 @@
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 600px) {
|
||||||
|
|
||||||
|
.packageReviewText {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (min-width: 540px) {
|
@media all and (min-width: 540px) {
|
||||||
|
|
||||||
.backdropPosterItem {
|
.backdropPosterItem {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
MediaTypes: "Game",
|
MediaTypes: "Game",
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "Genres,Studios",
|
Fields: "Genres,Studios,PrimaryImageAspectRatio",
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,32 +32,14 @@
|
||||||
var checkSortOption = $('.radioSortBy:checked', page);
|
var checkSortOption = $('.radioSortBy:checked', page);
|
||||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||||
|
|
||||||
if (view == "Backdrop") {
|
html = LibraryBrowser.getPosterViewHtml({
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
preferBackdrop: true,
|
shape: "auto",
|
||||||
context: "games",
|
context: 'games',
|
||||||
shape: "backdrop"
|
useAverageAspectRatio: false,
|
||||||
|
showTitle: true,
|
||||||
|
showParentTitle: true
|
||||||
});
|
});
|
||||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
|
||||||
}
|
|
||||||
else if (view == "Poster") {
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
|
||||||
items: result.Items,
|
|
||||||
context: "games",
|
|
||||||
shape: "poster"
|
|
||||||
});
|
|
||||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
|
||||||
}
|
|
||||||
else if (view == "Timeline") {
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
|
||||||
items: result.Items,
|
|
||||||
context: "games",
|
|
||||||
shape: "poster",
|
|
||||||
timeline: true
|
|
||||||
});
|
|
||||||
$('.itemsContainer', page).addClass('timelineItemsContainer');
|
|
||||||
}
|
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
|
|
|
@ -594,6 +594,15 @@
|
||||||
displayAsSpecial: item.Type == "Season" && item.IndexNumber
|
displayAsSpecial: item.Type == "Season" && item.IndexNumber
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if (item.Type == "GameSystem") {
|
||||||
|
html = LibraryBrowser.getPosterViewHtml({
|
||||||
|
items: result.Items,
|
||||||
|
shape: "auto",
|
||||||
|
context: 'games',
|
||||||
|
useAverageAspectRatio: false,
|
||||||
|
showTitle: true
|
||||||
|
});
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
html = LibraryBrowser.getPosterDetailViewHtml({
|
html = LibraryBrowser.getPosterDetailViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
|
|
|
@ -667,7 +667,24 @@
|
||||||
|
|
||||||
var html = "";
|
var html = "";
|
||||||
|
|
||||||
var primaryImageAspectRatio = options.useAverageAspectRatio ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null;
|
var primaryImageAspectRatio = options.useAverageAspectRatio || options.shape == 'auto' ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null;
|
||||||
|
|
||||||
|
if (options.shape == 'auto') {
|
||||||
|
|
||||||
|
if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) {
|
||||||
|
options.shape = 'backdrop';
|
||||||
|
}
|
||||||
|
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .3) {
|
||||||
|
options.shape = 'square';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
options.shape = 'portrait';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!options.useAverageAspectRatio) {
|
||||||
|
primaryImageAspectRatio = null;
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
for (var i = 0, length = items.length; i < length; i++) {
|
||||||
|
|
||||||
|
@ -938,7 +955,7 @@
|
||||||
if (options.showParentTitle) {
|
if (options.showParentTitle) {
|
||||||
|
|
||||||
html += "<div class='" + cssclass + "'>";
|
html += "<div class='" + cssclass + "'>";
|
||||||
html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || " ");
|
html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || " ");
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,32 +31,13 @@
|
||||||
var checkSortOption = $('.radioSortBy:checked', page);
|
var checkSortOption = $('.radioSortBy:checked', page);
|
||||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||||
|
|
||||||
if (view == "Backdrop") {
|
html = LibraryBrowser.getPosterViewHtml({
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
preferBackdrop: true,
|
shape: "square",
|
||||||
context: "music",
|
context: 'music',
|
||||||
shape: "backdrop"
|
useAverageAspectRatio: true,
|
||||||
|
showTitle: true
|
||||||
});
|
});
|
||||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
|
||||||
}
|
|
||||||
else if (view == "Poster") {
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
|
||||||
items: result.Items,
|
|
||||||
context: "music",
|
|
||||||
shape: "poster"
|
|
||||||
});
|
|
||||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
|
||||||
}
|
|
||||||
else if (view == "Timeline") {
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
|
||||||
items: result.Items,
|
|
||||||
context: "music",
|
|
||||||
shape: "poster",
|
|
||||||
timeline: true
|
|
||||||
});
|
|
||||||
$('.itemsContainer', page).addClass('timelineItemsContainer');
|
|
||||||
}
|
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
|
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
|
|
||||||
html += "<div class='posterItemText' style='color:#000;font-weight:400;font-size:15px;'>";
|
html += "<div class='posterItemText packageReviewText' style='color:#000;font-weight:400;font-size:15px;'>";
|
||||||
html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : "Free";
|
html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : "Free";
|
||||||
html += Dashboard.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name);
|
html += Dashboard.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue