public static string FormatAudioCodec(MediaInfoModel mediaInfo) { var codec = QualityParser.ParseCodec(mediaInfo.AudioFormat, null); if (CodecNames.ContainsKey(codec)) { return(CodecNames[codec]); } else { Logger.Debug() .Message("Unknown audio format: '{0}'.", string.Join(", ", mediaInfo.AudioFormat)) .WriteSentryWarn("UnknownAudioFormat", mediaInfo.AudioFormat) .Write(); return("Unknown"); } }
public void should_parse_null_quality_description_as_unknown() { QualityParser.ParseCodec(null, null).Should().Be(Codec.Unknown); }