aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Dto
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-27 10:30:21 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-27 10:30:21 -0400
commit6da117f606610337c54f5c6065590d018c84d4f8 (patch)
treeee26cdf50592aac2f844da6a6039dbfec1b5d24b /MediaBrowser.Server.Implementations/Dto
parent8c0388df6b6bb88c132b204389e97f78c37c483c (diff)
resize library buttons
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs35
1 files changed, 15 insertions, 20 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index d83fd412f0..3ca70de160 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -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();
+ try
+ {
+ 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)
+ if (bitrate > 0)
+ {
+ info.Bitrate = bitrate;
+ }
+ }
+ catch (OverflowException ex)
{
- info.Bitrate = bitrate;
+ _logger.ErrorException("Error calculating total bitrate", ex);
}
return info;