1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

Fixed: Parsing anime dual language titles

closes #3756
This commit is contained in:
Taloth Saldono
2020-05-17 23:01:41 +02:00
parent 5251db7224
commit a75e10c4c9
6 changed files with 94 additions and 2 deletions
@@ -1,5 +1,7 @@
using Moq;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.DataAugmentation.Scene;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
@@ -43,5 +45,18 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
.Verify(s => s.FindByTitle(parsedEpisodeInfo.SeriesTitleInfo.TitleWithoutYear,
parsedEpisodeInfo.SeriesTitleInfo.Year), Times.Once());
}
[Test]
public void should_parse_concatenated_title()
{
var series = new Series { TvdbId = 100 };
Mocker.GetMock<ISeriesService>().Setup(v => v.FindByTitle("Welcome")).Returns(series);
Mocker.GetMock<ISceneMappingService>().Setup(v => v.FindTvdbId("Mairimashita", It.IsAny<string>())).Returns(100);
var result = Subject.GetSeries("Welcome (Mairimashita).S01E01.720p.WEB-DL-Viva");
result.Should().NotBeNull();
result.TvdbId.Should().Be(100);
}
}
}