diff --git a/src/NzbDrone.Core.Test/TvTests/SeriesTitleNormalizerFixture.cs b/src/NzbDrone.Core.Test/TvTests/SeriesTitleNormalizerFixture.cs index afc334895..41d079ccc 100644 --- a/src/NzbDrone.Core.Test/TvTests/SeriesTitleNormalizerFixture.cs +++ b/src/NzbDrone.Core.Test/TvTests/SeriesTitleNormalizerFixture.cs @@ -24,6 +24,7 @@ public void should_use_precomputed_title(string title, int tvdbId, string expect [TestCase("A.I.C.O. -Incarnation-", "aico incarnation")] [TestCase("A.D. The Bible Continues", "ad the bible continues")] [TestCase("A.P. Bio", "ap bio")] + [TestCase("A-Team", "ateam")] [TestCase("The A-Team", "ateam")] [TestCase("And Just Like That", "and just like that")] public void should_normalize_title(string title, string expected) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index fe6796125..ca8432bd3 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -900,8 +900,7 @@ public static string NormalizeEpisodeTitle(string title) title = PunctuationRegex.Replace(title, " "); title = DuplicateSpacesRegex.Replace(title, " "); - return title.Trim() - .ToLower(); + return title.Trim().ToLower(); } public static string NormalizeTitle(string title) diff --git a/src/NzbDrone.Core/Tv/SeriesTitleNormalizer.cs b/src/NzbDrone.Core/Tv/SeriesTitleNormalizer.cs index 15959031d..f9f4f680c 100644 --- a/src/NzbDrone.Core/Tv/SeriesTitleNormalizer.cs +++ b/src/NzbDrone.Core/Tv/SeriesTitleNormalizer.cs @@ -4,19 +4,16 @@ namespace NzbDrone.Core.Tv { public static class SeriesTitleNormalizer { - private static readonly Dictionary PreComputedTitles = new Dictionary - { - { 281588, "a to z" }, - { 289260, "ad bible continues" }, - { 328534, "ap bio" }, - { 77904, "ateam" } - }; + private static readonly Dictionary PreComputedTitles = new() + { + { 281588, "a to z" }, + }; public static string Normalize(string title, int tvdbId) { - if (PreComputedTitles.ContainsKey(tvdbId)) + if (PreComputedTitles.TryGetValue(tvdbId, out var value)) { - return PreComputedTitles[tvdbId]; + return value; } return Parser.Parser.NormalizeTitle(title).ToLower();