From b8c92d23f4ca615441d706537d1ebc221a3b6ba6 Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 25 Jan 2022 19:01:01 -0600 Subject: [PATCH] Fixed: Ignore case for DIVX VideoCodecID --- .../MediaInfoFormatterTests/FormatVideoCodecFixture.cs | 2 ++ .../MediaFiles/MediaInfo/MediaInfoFormatter.cs | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs index c7f425095..5bab3401e 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs @@ -19,6 +19,8 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo.MediaInfoFormatterTests [TestCase("wmv1, WMV1", "Droned.wmv", "WMV")] [TestCase("wmv2, WMV2", "Droned.wmv", "WMV")] [TestCase("mpeg4, XVID", "", "XviD")] + [TestCase("mpeg4, DIVX", "", "DivX")] + [TestCase("mpeg4, divx", "", "DivX")] [TestCase("mpeg4, DIV3", "spsm.dvdrip.divx.avi'.", "DivX")] [TestCase("msmpeg4, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")] [TestCase("msmpeg4v2, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")] diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs index 1b6747cf4..7b5e38d27 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs @@ -217,8 +217,8 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo } if (videoCodecID == "DIV3" || - videoCodecID == "DIVX" || - videoCodecID == "DX50") + videoCodecID == "DX50" || + videoCodecID.ToUpperInvariant() == "DIVX") { return "DivX"; } @@ -256,7 +256,8 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo videoFormat == "rv10" || videoFormat == "rv20" || videoFormat == "rv30" || - videoFormat == "rv40") + videoFormat == "rv40" || + videoFormat == "cinepak") { return ""; }