From c70740e3b64cc4ebbf71ecd88ceb2bd9a19d6ebf Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sun, 13 Aug 2017 12:27:12 +0200 Subject: [PATCH] Remove extension from ReleaseTitle. Fixes #2118 --- src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs | 8 ++++++++ src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 5b214a0e6..061e4ecf5 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -72,5 +72,13 @@ namespace NzbDrone.Core.Test.ParserTests Parser.Parser.ParseTitle(title).Quality.Quality.Should().NotBe(Quality.Unknown); Parser.Parser.ParseTitle(title).Quality.QualitySource.Should().Be(QualitySource.Extension); } + + + [TestCase("Revolution.S01E02.Chained.Heat.mkv", "Revolution.S01E02.Chained.Heat")] + public void should_parse_releasetitle(string path, string releaseTitle) + { + var result = Parser.Parser.ParseTitle(path); + result.ReleaseTitle.Should().Be(releaseTitle); + } } } diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 36d54664b..3a20f7d09 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -355,7 +355,7 @@ namespace NzbDrone.Core.Parser Logger.Trace(regex); try { - var result = ParseMatchCollection(match, title); + var result = ParseMatchCollection(match, releaseTitle); if (result != null) {