Added XviD to MediaInfoFormatter.

This commit is contained in:
Taloth Saldono 2017-07-14 16:12:38 +02:00
parent c68ef626d2
commit a4f51aeef9
1 changed files with 15 additions and 0 deletions

View File

@ -44,6 +44,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
{ {
var audioFormat = mediaInfo.AudioFormat; var audioFormat = mediaInfo.AudioFormat;
if (audioFormat.IsNullOrWhiteSpace())
{
return audioFormat;
}
if (audioFormat == "AC-3") if (audioFormat == "AC-3")
{ {
return "AC3"; return "AC3";
@ -77,6 +82,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
{ {
var videoCodec = mediaInfo.VideoCodec; var videoCodec = mediaInfo.VideoCodec;
if (videoCodec.IsNullOrWhiteSpace())
{
return videoCodec;
}
if (videoCodec == "AVC") if (videoCodec == "AVC")
{ {
return sceneName.IsNotNullOrWhiteSpace() && Path.GetFileNameWithoutExtension(sceneName).Contains("h264") return sceneName.IsNotNullOrWhiteSpace() && Path.GetFileNameWithoutExtension(sceneName).Contains("h264")
@ -96,6 +106,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
return "MPEG2"; return "MPEG2";
} }
if (videoCodec.Equals("XviD", StringComparison.OrdinalIgnoreCase))
{
return "XviD";
}
Logger.Error("Unknown video codec: {0}", videoCodec); Logger.Error("Unknown video codec: {0}", videoCodec);
return videoCodec; return videoCodec;
} }