Updates to MediaInfo Formatter

pull/94/head
Qstick 7 years ago
parent d243a8c8c4
commit e3c6bc3263

@ -35,8 +35,14 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
return mediaInfo.AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? audioChannels - 1 + 0.1m : audioChannels; return mediaInfo.AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? audioChannels - 1 + 0.1m : audioChannels;
} }
if (audioChannelPositions.Contains("+"))
{
return audioChannelPositions.Split('+')
.Sum(s => decimal.Parse(s.Trim(), CultureInfo.InvariantCulture));
}
return audioChannelPositions.Replace("Object Based / ", "") return audioChannelPositions.Replace("Object Based / ", "")
.Split(new [] { " / " }, StringSplitOptions.None) .Split(new[] { " / " }, StringSplitOptions.RemoveEmptyEntries)
.First() .First()
.Split('/') .Split('/')
.Sum(s => decimal.Parse(s, CultureInfo.InvariantCulture)); .Sum(s => decimal.Parse(s, CultureInfo.InvariantCulture));

Loading…
Cancel
Save