1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Added: Fallback to Bitrate_Nominal for MediaInfo (#2886)

Fixes #2860
This commit is contained in:
Qstick 2018-09-12 10:45:54 -04:00 committed by Leonardo Galli
parent df6f32f6c3
commit 2b373f2006

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Globalization;
using System.IO;
using NLog;
@ -96,6 +96,10 @@ public MediaInfoModel GetMediaInfo(string filename)
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);
if (videoBitRate <= 0)
{
int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitRate_Nominal"), 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);