Fix Audiochannels just being added together.

This commit is contained in:
Leonardo Galli 2017-01-17 13:03:20 +01:00
parent b309a9b01f
commit 08db74d6e6
1 changed files with 5 additions and 1 deletions

View File

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