2021-08-26 18:01:56 +00:00
|
|
|
using Emby.Naming.Common;
|
|
|
|
using Emby.Naming.TV;
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
namespace Jellyfin.Naming.Tests.TV
|
|
|
|
{
|
|
|
|
public class SeriesResolverTests
|
|
|
|
{
|
2022-01-04 16:59:30 +00:00
|
|
|
private readonly NamingOptions _namingOptions = new NamingOptions();
|
|
|
|
|
2021-08-26 18:01:56 +00:00
|
|
|
[Theory]
|
|
|
|
[InlineData("The.Show.S01", "The Show")]
|
|
|
|
[InlineData("The.Show.S01.COMPLETE", "The Show")]
|
|
|
|
[InlineData("S.H.O.W.S01", "S.H.O.W")]
|
|
|
|
[InlineData("The.Show.P.I.S01", "The Show P.I")]
|
|
|
|
[InlineData("The_Show_Season_1", "The Show")]
|
|
|
|
[InlineData("/something/The_Show/Season 10", "The Show")]
|
|
|
|
[InlineData("The Show", "The Show")]
|
|
|
|
[InlineData("/some/path/The Show", "The Show")]
|
|
|
|
[InlineData("/some/path/The Show s02e10 720p hdtv", "The Show")]
|
|
|
|
[InlineData("/some/path/The Show s02e10 the episode 720p hdtv", "The Show")]
|
|
|
|
public void SeriesResolverResolveTest(string path, string name)
|
|
|
|
{
|
2022-01-04 16:59:30 +00:00
|
|
|
var res = SeriesResolver.Resolve(_namingOptions, path);
|
2021-08-26 18:01:56 +00:00
|
|
|
|
|
|
|
Assert.Equal(name, res.Name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|