mirror of https://github.com/Sonarr/Sonarr
Added XviD to MediaInfoFormatter.
This commit is contained in:
parent
c68ef626d2
commit
a4f51aeef9
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue