diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 3042f2ba9..8af549852 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -1303,53 +1303,9 @@ }); }; - self.getSimilarMovies = function (itemId, options) { + self.getSimilarItems = function (itemId, options) { - var url = self.getUrl("Movies/" + itemId + "/Similar", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getSimilarTrailers = function (itemId, options) { - - var url = self.getUrl("Trailers/" + itemId + "/Similar", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getSimilarShows = function (itemId, options) { - - var url = self.getUrl("Shows/" + itemId + "/Similar", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getSimilarAlbums = function (itemId, options) { - - var url = self.getUrl("Albums/" + itemId + "/Similar", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getSimilarGames = function (itemId, options) { - - var url = self.getUrl("Games/" + itemId + "/Similar", options); + var url = self.getUrl("Items/" + itemId + "/Similar", options); return self.ajax({ type: "GET", diff --git a/dashboard-ui/livetv.html b/dashboard-ui/livetv.html index 2470b1fad..4cd6c2684 100644 --- a/dashboard-ui/livetv.html +++ b/dashboard-ui/livetv.html @@ -43,7 +43,7 @@

${HeaderUpcomingMovies}

- ${ButtonMoreItems} + ${ButtonMoreItems}

@@ -51,7 +51,7 @@

${HeaderUpcomingSports}

- ${ButtonMoreItems} + ${ButtonMoreItems}

@@ -59,7 +59,7 @@

${HeaderUpcomingForKids}

- ${ButtonMoreItems} + ${ButtonMoreItems}

diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index 086530a4b..f7eb32986 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -216,7 +216,7 @@ IncludeItemTypes: "Audio", PersonTypes: "", ArtistIds: "", - Limit: 100 + Limit: 50 }, { playFromHere: true, defaultAction: 'playallfromhere', diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 072d801f1..c9fbd5383 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -583,7 +583,13 @@ function renderSimilarItems(page, item, context) { - var promise; + if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "Series" || item.Type == "Program" || item.Type == "Recording" || item.Type == "Game" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "ChannelVideoItem") { + $('#similarCollapsible', page).show(); + } + else { + $('#similarCollapsible', page).hide(); + return; + } var screenWidth = $(window).width(); @@ -593,28 +599,7 @@ fields: "PrimaryImageAspectRatio,UserData,SyncInfo" }; - if (item.Type == "Movie") { - promise = ApiClient.getSimilarMovies(item.Id, options); - } - else if (item.Type == "Trailer" || - (item.Type == "ChannelVideoItem" && item.ExtraType == "Trailer")) { - promise = ApiClient.getSimilarTrailers(item.Id, options); - } - else if (item.Type == "MusicAlbum") { - options.limit = 4; - promise = ApiClient.getSimilarAlbums(item.Id, options); - } - else if (item.Type == "Series") { - promise = ApiClient.getSimilarShows(item.Id, options); - } - else if (item.MediaType == "Game") { - promise = ApiClient.getSimilarGames(item.Id, options); - } else { - $('#similarCollapsible', page).hide(); - return; - } - - promise.done(function (result) { + ApiClient.getSimilarItems(item.Id, options).done(function (result) { if (!result.Items.length) { @@ -628,15 +613,15 @@ var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: item.Type == "MusicAlbum" ? "detailPageSquare" : "detailPagePortrait", + shape: item.Type == "MusicAlbum" || item.Type == "MusicArtist" ? "detailPageSquare" : "detailPagePortrait", showParentTitle: item.Type == "MusicAlbum", - centerText: item.Type != "MusicAlbum", - showTitle: item.Type == "MusicAlbum" || item.Type == "Game", + centerText: true, + showTitle: item.Type == "MusicAlbum" || item.Type == "Game" || item.Type == "MusicArtist", borderless: item.Type == "Game", context: context, - overlayText: item.Type != "MusicAlbum", lazy: true, - showDetailsMenu: true + showDetailsMenu: true, + coverImage: item.Type == "MusicAlbum" || item.Type == "MusicArtist" }); $('#similarContent', page).html(html).lazyChildren(); diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index ac392b809..7f2d07f9a 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -165,7 +165,7 @@ paper-button.mini { } paper-button.mini .content { - padding: 0.3em 0.7em; + padding: 0.5em 0.7em; } paper-button.mini.noIcon .content {