From 476110b1de7ad08ca1145fffcc76b5ddd38153a2 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sun, 8 Jul 2018 18:36:00 +0200 Subject: [PATCH] Fixed: Store BitRate_Nominal (VBR) mediainfo in database instead of only BitRate. ref Radarr/Radarr#2860 --- .../MediaFiles/MediaInfo/VideoFileInfoReader.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index 7a34341f6..98e32b1f0 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -99,7 +99,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo string scanType = mediaInfo.Get(StreamKind.Video, 0, "ScanType"); int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "Width"), out width); int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "Height"), out height); - int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitRate"), out videoBitRate); + int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitRate_Nominal"), out videoBitRate); + if (videoBitRate <= 0) + { + int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitRate"), out videoBitRate); + } decimal.TryParse(mediaInfo.Get(StreamKind.Video, 0, "FrameRate"), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out videoFrameRate); int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitDepth"), out videoBitDepth);