mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rudimentary game view support
This commit is contained in:
parent
421c559c2b
commit
d7c4b43899
16 changed files with 1372 additions and 2 deletions
51
dashboard-ui/scripts/gamesrecommendedpage.js
Normal file
51
dashboard-ui/scripts/gamesrecommendedpage.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
(function ($, document) {
|
||||
|
||||
$(document).on('pagebeforeshow', "#gamesRecommendedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsUnplayed"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getGamePosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Game",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsPlayed"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#resumableItems', page).html(LibraryBrowser.getGamePosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue