-
Trailers
+
diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js
index efb9791529..fc303ed78e 100644
--- a/dashboard-ui/scripts/channelitems.js
+++ b/dashboard-ui/scripts/channelitems.js
@@ -9,7 +9,7 @@
};
function getSavedQueryId() {
- return 'channels-' + getParameterByName('id');
+ return 'channels-' + getParameterByName('id') + (getParameterByName('categoryId') || '');
}
function showLoadingMessage(page) {
@@ -26,9 +26,15 @@
showLoadingMessage(page);
var channelId = getParameterByName('id');
+ var categoryId = getParameterByName('categoryId');
query.UserId = Dashboard.getCurrentUserId();
+ ApiClient.getItem(query.UserId, categoryId || channelId).done(function (item) {
+
+ $('.categoryTitle', page).html(item.Name);
+ });
+
$.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) {
// Scroll back up so they can see the results from the beginning
@@ -42,7 +48,7 @@
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
- shape: "portrait",
+ shape: "auto",
context: 'channels',
showTitle: true,
centerText: true
diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js
index 3f6001b6fe..fee4bcbaaa 100644
--- a/dashboard-ui/scripts/indexpage.js
+++ b/dashboard-ui/scripts/indexpage.js
@@ -16,10 +16,9 @@
$('.myLibrary', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
- preferBackdrop: true,
shape: 'backdrop',
- overlayText: true,
- showTitle: true
+ showTitle: true,
+ centerText: true
})).createPosterItemMenus();
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index f41aeee2ed..f018519822 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -1,11 +1,11 @@
var LibraryBrowser = (function (window, document, $, screen, localStorage) {
- $(function() {
+ $(function () {
$("body").on("create", function () {
$(".lazy").unveil(200);
});
});
-
+
var defaultBackground = "#333";
return {
@@ -346,7 +346,7 @@
if (!item) {
throw new Error('item cannot be null');
}
-
+
if (item.url) {
return item.url;
}
@@ -362,6 +362,9 @@
if (item.Type == "Channel") {
return "channelitems.html?id=" + id;
}
+ if (item.Type == "ChannelCategoryItem") {
+ return "channelitems.html?id=" + item.ChannelId + '&categoryId=' + item.Id;
+ }
if (item.Type == "Program") {
return "livetvprogram.html?id=" + id;
}
@@ -440,10 +443,12 @@
var html = "";
- var primaryImageAspectRatio = options.shape == 'auto' ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null;
+ var primaryImageAspectRatio;
if (options.shape == 'auto') {
+ primaryImageAspectRatio = options.shape == 'auto' ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null;
+
if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) {
options.shape = 'backdrop';
}