1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

support channel folders

This commit is contained in:
Luke Pulverenti 2014-05-04 20:46:52 -04:00
parent b88819dd78
commit 636ea91460
4 changed files with 20 additions and 10 deletions

View file

@ -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';
}