1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add library to front page

This commit is contained in:
Luke Pulverenti 2014-05-13 20:46:45 -04:00
parent dc6dbcf469
commit 655c9cb48f
11 changed files with 102 additions and 28 deletions

View file

@ -27,9 +27,9 @@
html += '</div>';
html += '</div>';
if (nextUp && nextUp.ImageTags && nextUp.ImageTags.Primary) {
html += '<div class="spotlightContent rightSpotlightContent">';
imgUrl = ApiClient.getImageUrl(nextUp.Id, {
@ -113,6 +113,24 @@
var options = {
SortBy: "SortName",
Fields: "PrimaryImageAspectRatio"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('.myLibrary', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: 'smallBackdrop',
showTitle: true,
centerText: true
})).createPosterItemMenus();
});
options = {
SortBy: "DatePlayed",
SortOrder: "Descending",
MediaTypes: "Video",
@ -124,7 +142,7 @@
ExcludeLocationTypes: "Virtual"
};
var promise1 = ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
if (result.Items.length) {
$('#resumableSection', page).show();
@ -156,7 +174,7 @@
ExcludeLocationTypes: "Virtual,Remote"
};
var promise2 = ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
@ -168,9 +186,6 @@
})).createPosterItemMenus();
});
//var allPromise = $.when(promise1, promise2);
//reloadSpotlight(page, allPromise);
});
})(jQuery, document, ApiClient);