resize library buttons

This commit is contained in:
Luke Pulverenti
2014-05-27 10:30:21 -04:00
parent 8c0388df6b
commit 6da117f606
9 changed files with 36 additions and 36 deletions

View File

@@ -771,23 +771,11 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.Name = item.Name;
dto.OfficialRating = item.OfficialRating;
var hasOverview = fields.Contains(ItemFields.Overview);
var hasHtmlOverview = fields.Contains(ItemFields.OverviewHtml);
if (hasOverview || hasHtmlOverview)
if (fields.Contains(ItemFields.Overview))
{
var strippedOverview = string.IsNullOrEmpty(item.Overview) ? item.Overview : item.Overview.StripHtml();
if (hasOverview)
{
dto.Overview = strippedOverview;
}
// Only supply the html version if there was actually html content
if (hasHtmlOverview)
{
dto.OverviewHtml = item.Overview;
}
dto.Overview = strippedOverview;
}
// If there are no backdrops, indicate what parent has them in case the Ui wants to allow inheritance
@@ -1251,14 +1239,21 @@ namespace MediaBrowser.Server.Implementations.Dto
}
}
var bitrate = i.TotalBitrate ??
info.MediaStreams.Where(m => m.Type != MediaStreamType.Subtitle && !string.Equals(m.Codec, "mjpeg", StringComparison.OrdinalIgnoreCase))
.Select(m => m.BitRate ?? 0)
.Sum();
if (bitrate > 0)
try
{
info.Bitrate = bitrate;
var bitrate = i.TotalBitrate ??
info.MediaStreams.Where(m => m.Type != MediaStreamType.Subtitle && !string.Equals(m.Codec, "mjpeg", StringComparison.OrdinalIgnoreCase))
.Select(m => m.BitRate ?? 0)
.Sum();
if (bitrate > 0)
{
info.Bitrate = bitrate;
}
}
catch (OverflowException ex)
{
_logger.ErrorException("Error calculating total bitrate", ex);
}
return info;