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

removed dead code

This commit is contained in:
Luke Pulverenti 2016-09-12 17:24:05 -04:00
parent 114a010bd4
commit 2a7324e3d7
2 changed files with 19 additions and 67 deletions

View file

@ -818,6 +818,16 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
lines.push(item.ProductionYear || ''); lines.push(item.ProductionYear || '');
} }
if (options.showRuntime) {
if (item.RunTimeTicks) {
lines.push(datetime.getDisplayRunningTime(item.RunTimeTicks));
} else {
lines.push('');
}
}
if (options.showChannelName) { if (options.showChannelName) {
lines.push(item.ChannelName || ''); lines.push(item.ChannelName || '');

View file

@ -1807,73 +1807,15 @@
function getVideosHtml(items, user, limit, moreButtonClass) { function getVideosHtml(items, user, limit, moreButtonClass) {
var html = ''; var html = cardBuilder.getCardsHtml({
items: items,
for (var i = 0, length = items.length; i < length; i++) { shape: "backdrop",
preferThumb: true,
if (limit && i >= limit) { showTitle: true,
break; action: 'play',
} overlayText: true,
showRuntime: true
var item = items[i]; });
var cssClass = "card backdropCard scalableCard backdropCard-scalable";
var href = "itemdetails.html?id=" + item.Id;
var onclick = item.PlayAccess == 'Full' ? ' onclick="MediaController.play(\'' + item.Id + '\'); return false;"' : "";
html += '<a class="' + cssClass + '" href="' + href + '"' + onclick + '>';
html += '<div class="cardBox">';
html += '<div class="cardScalable">';
var imageTags = item.ImageTags || {};
var imgUrl;
if (imageTags.Primary) {
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
maxWidth: 400,
tag: imageTags.Primary,
type: "primary"
});
} else {
imgUrl = "css/images/items/detail/video.png";
}
html += '<div class="cardPadder cardPadder-backdrop"></div>';
html += '<div class="cardContent">';
html += '<div class="cardImage lazy" data-src="' + imgUrl + '"></div>';
html += '<div class="innerCardFooter">';
html += '<div class="cardText">' + item.Name + '</div>';
html += '<div class="cardText">';
if (item.RunTimeTicks != "") {
html += datetime.getDisplayRunningTime(item.RunTimeTicks);
}
else {
html += "&nbsp;";
}
html += '</div>';
//cardFooter
html += "</div>";
// cardContent
html += '</div>';
// cardScalable
html += '</div>';
// cardBox
html += '</div>';
html += '</a>';
}
if (limit && items.length > limit) { if (limit && items.length > limit) {
html += '<p style="margin: 0;padding-left:5px;"><button is="emby-button" type="button" class="raised more ' + moreButtonClass + '">' + Globalize.translate('ButtonMore') + '</button></p>'; html += '<p style="margin: 0;padding-left:5px;"><button is="emby-button" type="button" class="raised more ' + moreButtonClass + '">' + Globalize.translate('ButtonMore') + '</button></p>';