Fixes issue when multiple audio channels are present. Fixes #315 Fixes #294

pull/384/merge v0.2.0.210
Leonardo Galli 8 years ago
parent ec6b389d75
commit f0bcb27beb

@ -48,11 +48,12 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
return AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? AudioChannels - 1 + 0.1m : AudioChannels; return AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? AudioChannels - 1 + 0.1m : AudioChannels;
} }
decimal channels = 0; return
AudioChannelPositions.Replace(" / ", "$")
decimal.TryParse(AudioChannelPositions.Split('/').First(), out channels); .Split('$')
.First()
return channels; .Split('/')
.Sum(s => decimal.Parse(s, CultureInfo.InvariantCulture));
} }
} }
} }

Loading…
Cancel
Save