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

add new web client sidebar

This commit is contained in:
Luke Pulverenti 2014-05-03 19:38:23 -04:00
parent be0861a1ee
commit 3e1c78d345
21 changed files with 201 additions and 99 deletions

View file

@ -2,14 +2,31 @@
$(document).on('pagebeforeshow', "#indexPage", function () {
var parentId = LibraryMenu.getTopParentId();
var screenWidth = $(window).width();
var page = this;
var options = {
SortBy: "SortName",
Fields: "PrimaryImageAspectRatio"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('.myLibrary', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
preferBackdrop: true,
shape: 'backdrop',
overlayText: true,
showTitle: true
})).createPosterItemMenus();
});
options = {
SortBy: "DatePlayed",
SortOrder: "Descending",
MediaTypes: "Video",
@ -18,8 +35,7 @@
Recursive: true,
Fields: "PrimaryImageAspectRatio",
CollapseBoxSetItems: false,
ExcludeLocationTypes: "Virtual",
ParentId: parentId
ExcludeLocationTypes: "Virtual"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
@ -45,19 +61,18 @@
SortBy: "DateCreated",
SortOrder: "Descending",
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 24 : (screenWidth >= 800 ? 18 : 12)),
Limit: screenWidth >= 1920 ? 12 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 12 : 12)),
Recursive: true,
Fields: "PrimaryImageAspectRatio",
Filters: "IsUnplayed,IsNotFolder",
CollapseBoxSetItems: false,
ExcludeLocationTypes: "Virtual,Remote",
ParentId: parentId
ExcludeLocationTypes: "Virtual,Remote"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
preferThumb: true,
shape: 'backdrop',