mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
a little attention to the games page
This commit is contained in:
parent
5783b78b08
commit
866c468d7e
4 changed files with 94 additions and 40 deletions
|
@ -1,52 +1,91 @@
|
|||
(function ($, document) {
|
||||
|
||||
$(document).on('pagebeforeshow', "#gamesRecommendedPage", function () {
|
||||
$(document).on('pagebeforeshow', "#gamesRecommendedPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this;
|
||||
|
||||
var options = {
|
||||
var options = {
|
||||
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsUnplayed"
|
||||
};
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsUnplayed"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false,
|
||||
transparent: true
|
||||
}));
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false,
|
||||
transparent: true,
|
||||
borderless: true,
|
||||
imagePosition: 'center center'
|
||||
}));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
options = {
|
||||
options = {
|
||||
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsPlayed"
|
||||
};
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsPlayed"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
transparent: true
|
||||
}));
|
||||
if (result.Items.length) {
|
||||
$('#recentlyPlayedSection', page).show();
|
||||
} else {
|
||||
$('#recentlyPlayedSection', page).hide();
|
||||
}
|
||||
|
||||
});
|
||||
$('#recentlyPlayedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
transparent: true,
|
||||
borderless: true,
|
||||
imagePosition: 'center center'
|
||||
}));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
options = {
|
||||
|
||||
SortBy: "PlayCount",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsPlayed"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
if (result.Items.length) {
|
||||
$('#frequentlyPlayedSection', page).show();
|
||||
} else {
|
||||
$('#frequentlyPlayedSection', page).hide();
|
||||
}
|
||||
|
||||
$('#frequentlyPlayedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
transparent: true,
|
||||
borderless: true,
|
||||
imagePosition: 'center center'
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue