support display of channel images

This commit is contained in:
Luke Pulverenti 2013-11-24 16:30:38 -05:00
parent 7d9ac4b9cb
commit d3a3e54791

View File

@ -6,8 +6,26 @@
html += '<a class="squareTileItem tileItem" href="#">';
var imgUrl = "css/images/items/list/collection.png";
var isDefault = true;
var imgUrl;
var isDefault;
if (channel.PrimaryImageTag) {
imgUrl = apiClient.getUrl("LiveTV/Channels/" + channel.Id + "/Images/Primary", {
tag: channel.PrimaryImageTag,
height: 300
});
} else {
imgUrl = "css/images/items/list/collection.png";
isDefault = true;
}
var cssClass = isDefault ? "tileImage defaultTileImage" : "tileImage";
html += '<div class="' + cssClass + '" style="background-image: url(\'' + imgUrl + '\');"></div>';