diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index 85784d2aa9..65a3b2784d 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -168,6 +168,13 @@ opacity: 1; } +@media all and (max-width: 600px) { + + .packageReviewText { + display: none; + } +} + @media all and (min-width: 540px) { .backdropPosterItem { diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js index 8678d16274..e86adbf3e5 100644 --- a/dashboard-ui/scripts/gamespage.js +++ b/dashboard-ui/scripts/gamespage.js @@ -10,7 +10,7 @@ SortOrder: "Ascending", MediaTypes: "Game", Recursive: true, - Fields: "Genres,Studios", + Fields: "Genres,Studios,PrimaryImageAspectRatio", StartIndex: 0 }; @@ -32,32 +32,14 @@ var checkSortOption = $('.radioSortBy:checked', page); $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); - if (view == "Backdrop") { - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - preferBackdrop: true, - context: "games", - shape: "backdrop" - }); - $('.itemsContainer', page).removeClass('timelineItemsContainer'); - } - else if (view == "Poster") { - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - context: "games", - shape: "poster" - }); - $('.itemsContainer', page).removeClass('timelineItemsContainer'); - } - else if (view == "Timeline") { - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - context: "games", - shape: "poster", - timeline: true - }); - $('.itemsContainer', page).addClass('timelineItemsContainer'); - } + html = LibraryBrowser.getPosterViewHtml({ + items: result.Items, + shape: "auto", + context: 'games', + useAverageAspectRatio: false, + showTitle: true, + showParentTitle: true + }); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 148ba19571..8ca1387f14 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -594,6 +594,15 @@ displayAsSpecial: item.Type == "Season" && item.IndexNumber }); } + else if (item.Type == "GameSystem") { + html = LibraryBrowser.getPosterViewHtml({ + items: result.Items, + shape: "auto", + context: 'games', + useAverageAspectRatio: false, + showTitle: true + }); + } else { html = LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index c047ab57db..9b2901850e 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -667,7 +667,24 @@ var html = ""; - var primaryImageAspectRatio = options.useAverageAspectRatio ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null; + var primaryImageAspectRatio = options.useAverageAspectRatio || options.shape == 'auto' ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null; + + if (options.shape == 'auto') { + + if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) { + options.shape = 'backdrop'; + } + else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .3) { + options.shape = 'square'; + } + else { + options.shape = 'portrait'; + } + } + + if (!options.useAverageAspectRatio) { + primaryImageAspectRatio = null; + } for (var i = 0, length = items.length; i < length; i++) { @@ -938,7 +955,7 @@ if (options.showParentTitle) { html += "
"; - html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || " "); + html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || " "); html += "
"; } diff --git a/dashboard-ui/scripts/musicvideos.js b/dashboard-ui/scripts/musicvideos.js index 762a386c7e..ffb70c1bd9 100644 --- a/dashboard-ui/scripts/musicvideos.js +++ b/dashboard-ui/scripts/musicvideos.js @@ -31,32 +31,13 @@ var checkSortOption = $('.radioSortBy:checked', page); $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); - if (view == "Backdrop") { - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - preferBackdrop: true, - context: "music", - shape: "backdrop" - }); - $('.itemsContainer', page).removeClass('timelineItemsContainer'); - } - else if (view == "Poster") { - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - context: "music", - shape: "poster" - }); - $('.itemsContainer', page).removeClass('timelineItemsContainer'); - } - else if (view == "Timeline") { - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - context: "music", - shape: "poster", - timeline: true - }); - $('.itemsContainer', page).addClass('timelineItemsContainer'); - } + html = LibraryBrowser.getPosterViewHtml({ + items: result.Items, + shape: "square", + context: 'music', + useAverageAspectRatio: true, + showTitle: true + }); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); diff --git a/dashboard-ui/scripts/plugincatalogpage.js b/dashboard-ui/scripts/plugincatalogpage.js index d5f1b5b07f..f5431a580e 100644 --- a/dashboard-ui/scripts/plugincatalogpage.js +++ b/dashboard-ui/scripts/plugincatalogpage.js @@ -108,7 +108,7 @@ html += ""; - html += "
"; + html += "
"; html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : "Free"; html += Dashboard.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name);