+
-
+
+
diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js
index ee79679d16..72750a228b 100644
--- a/dashboard-ui/scripts/gamespage.js
+++ b/dashboard-ui/scripts/gamespage.js
@@ -10,7 +10,7 @@
SortOrder: "Ascending",
MediaTypes: "Game",
Recursive: true,
- Fields: "UserData,DisplayMediaType,Genres,Studios",
+ Fields: "UserData,DisplayMediaType,Genres,Studios,PrimaryImageAspectRatio",
StartIndex: 0
};
diff --git a/dashboard-ui/scripts/gamesrecommendedpage.js b/dashboard-ui/scripts/gamesrecommendedpage.js
index 62ebfc51c5..1a221d43ed 100644
--- a/dashboard-ui/scripts/gamesrecommendedpage.js
+++ b/dashboard-ui/scripts/gamesrecommendedpage.js
@@ -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);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index d7b23958ca..47cd2ba5f1 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -640,6 +640,10 @@
cssClass += " transparentPosterItem";
}
+ if (options.borderless) {
+ cssClass += " borderlessPosterItem";
+ }
+
cssClass += ' ' + options.shape + 'PosterItem';
html += '
';
@@ -654,6 +658,10 @@
style += "background-color:" + background + ";";
}
+ if (options.imagePosition) {
+ style += "background-position:" + options.imagePosition + ";";
+ }
+
html += '';
var name = LibraryBrowser.getPosterViewDisplayName(item);