mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
This commit is contained in:
commit
867a549058
8 changed files with 56 additions and 13 deletions
|
@ -175,3 +175,14 @@
|
|||
.mediaInfoLabel {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.posterRibbon {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
background-color: #008FBB;
|
||||
padding: 3px 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ form, .readOnlyContent {
|
|||
display: inline-block;
|
||||
margin: 5px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
padding-bottom: 28px;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "BoxSet",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,ItemCounts"
|
||||
Fields: "PrimaryImageAspectRatio,ItemCounts,ItemCounts,DateCreated"
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
var LibraryBrowser = {
|
||||
|
||||
getDetaultPageSize: function() {
|
||||
getDetaultPageSize: function () {
|
||||
|
||||
if (window.location.toString().toLowerCase().indexOf('localhost') != -1) {
|
||||
return 100;
|
||||
}
|
||||
return 25;
|
||||
},
|
||||
|
||||
|
||||
getPosterViewHtml: function (options) {
|
||||
|
||||
var items = options.items;
|
||||
|
@ -35,7 +35,7 @@
|
|||
height: 198,
|
||||
width: 352,
|
||||
tag: item.BackdropImageTags[0]
|
||||
|
||||
|
||||
}) + "' />";
|
||||
} else if (hasPrimaryImage) {
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
|||
height: height,
|
||||
width: width,
|
||||
tag: item.ImageTags.Primary
|
||||
|
||||
|
||||
}) + "' />";
|
||||
|
||||
} else if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
@ -56,7 +56,7 @@
|
|||
height: 198,
|
||||
width: 352,
|
||||
tag: item.BackdropImageTags[0]
|
||||
|
||||
|
||||
}) + "' />";
|
||||
}
|
||||
else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist") {
|
||||
|
@ -78,6 +78,10 @@
|
|||
html += "</div>";
|
||||
}
|
||||
|
||||
if (options.showNewIndicator !== false) {
|
||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||
}
|
||||
|
||||
html += "</a></div>";
|
||||
}
|
||||
|
||||
|
@ -153,6 +157,10 @@
|
|||
html += "</div>";
|
||||
}
|
||||
|
||||
if (options.showNewIndicator !== false) {
|
||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||
}
|
||||
|
||||
html += "</a></div>";
|
||||
}
|
||||
|
||||
|
@ -220,12 +228,34 @@
|
|||
html += "</div>";
|
||||
}
|
||||
|
||||
if (options.showNewIndicator !== false) {
|
||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||
}
|
||||
|
||||
html += "</a></div>";
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getNewIndicatorHtml: function (item) {
|
||||
|
||||
if (item.RecentlyAddedItemCount) {
|
||||
return '<div class="posterRibbon">' + item.RecentlyAddedItemCount + ' New</div>';
|
||||
}
|
||||
|
||||
if (!item.IsFolder) {
|
||||
|
||||
var date = item.DateCreated;
|
||||
|
||||
if (date && (new Date().getTime() - parseISO8601Date(date).getTime()) < 1209600000) {
|
||||
return "<div class='posterRibbon'>New</div>";
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
getAveragePrimaryImageAspectRatio: function (items) {
|
||||
|
||||
var values = [];
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Movie",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,UserData,DisplayMediaType",
|
||||
Fields: "PrimaryImageAspectRatio,UserData,DisplayMediaType,ItemCounts,DateCreated",
|
||||
Limit: LibraryBrowser.getDetaultPageSize(),
|
||||
StartIndex: 0
|
||||
};
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false
|
||||
}));
|
||||
|
||||
});
|
||||
|
@ -59,7 +60,7 @@
|
|||
IncludeItemTypes: "Trailer",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,DateCreated",
|
||||
Filters: "IsUnplayed"
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getEpisodePosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false
|
||||
}));
|
||||
|
||||
});
|
||||
|
@ -33,7 +34,7 @@
|
|||
Filters: "IsResumable",
|
||||
Limit: 6,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo"
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Series",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo"
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,ItemCounts,DateCreated"
|
||||
};
|
||||
|
||||
function getTableHtml(items) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue