From f7271792222dfa6f4cf4e5b3c5d8876775f88e2b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 20 Nov 2013 10:37:21 -0500 Subject: [PATCH] fixes #631 - FFProbe Bluray Folder Rip --- .../MediaInfo/BaseFFProbeProvider.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs index a84310310..8ad2761cd 100644 --- a/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs +++ b/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs @@ -228,14 +228,21 @@ namespace MediaBrowser.Providers.MediaInfo // Get stream bitrate if (stream.Type != MediaStreamType.Subtitle) { + var bitrate = 0; + if (!string.IsNullOrEmpty(streamInfo.bit_rate)) { - stream.BitRate = int.Parse(streamInfo.bit_rate, UsCulture); + bitrate = int.Parse(streamInfo.bit_rate, UsCulture); } else if (formatInfo != null && !string.IsNullOrEmpty(formatInfo.bit_rate)) { // If the stream info doesn't have a bitrate get the value from the media format info - stream.BitRate = int.Parse(formatInfo.bit_rate, UsCulture); + bitrate = int.Parse(formatInfo.bit_rate, UsCulture); + } + + if (bitrate > 0) + { + stream.BitRate = bitrate; } }