mirror of https://github.com/Radarr/Radarr
Fixed error when language is present in title, but has dots instead of spaces. For example The.Danish.Girl.2015
This commit is contained in:
parent
b05d505bce
commit
58e81a916c
|
@ -88,6 +88,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("The Danish Girl 2015")]
|
[TestCase("The Danish Girl 2015")]
|
||||||
|
[TestCase("The.Danish.Girl.2015.1080p.BluRay.x264.DTS-HD.MA.5.1-RARBG")]
|
||||||
public void should_not_parse_language_in_movie_title(string postTitle)
|
public void should_not_parse_language_in_movie_title(string postTitle)
|
||||||
{
|
{
|
||||||
Parser.Parser.ParseMovieTitle(postTitle).Language.Should().Be(Language.English);
|
Parser.Parser.ParseMovieTitle(postTitle).Language.Should().Be(Language.English);
|
||||||
|
|
|
@ -412,9 +412,9 @@ namespace NzbDrone.Core.Parser
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
var languageTitle = simpleTitle;
|
var languageTitle = simpleTitle;
|
||||||
if (result.MovieTitle.IsNotNullOrWhiteSpace() )
|
if (match[0].Groups["title"].Success && match[0].Groups["title"].Value.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
languageTitle = simpleTitle.Replace(result.MovieTitle, "A Movie");
|
languageTitle = simpleTitle.Replace(match[0].Groups["title"].Value, "A Movie");
|
||||||
}
|
}
|
||||||
|
|
||||||
result.Language = LanguageParser.ParseLanguage(languageTitle);
|
result.Language = LanguageParser.ParseLanguage(languageTitle);
|
||||||
|
|
Loading…
Reference in New Issue