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

pull/2/head
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;
}
decimal channels = 0;
decimal.TryParse(AudioChannelPositions.Split('/').First(), out channels);
return channels;
return
AudioChannelPositions.Replace(" / ", "$")
.Split('$')
.First()
.Split('/')
.Sum(s => decimal.Parse(s, CultureInfo.InvariantCulture));
}
}
}

Loading…
Cancel
Save