mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
Simplify StackResolver
This commit is contained in:
@@ -10,7 +10,6 @@ namespace Jellyfin.Naming.Tests.Common
|
||||
{
|
||||
var options = new NamingOptions();
|
||||
|
||||
Assert.NotEmpty(options.VideoFileStackingRegexes);
|
||||
Assert.NotEmpty(options.CleanDateTimeRegexes);
|
||||
Assert.NotEmpty(options.CleanStringRegexes);
|
||||
Assert.NotEmpty(options.EpisodeWithoutSeasonRegexes);
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace Jellyfin.Naming.Tests.Video
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestDirtyNames()
|
||||
public void ResolveFiles_GivenPartInMiddleOfName_ReturnsNoStack()
|
||||
{
|
||||
var files = new[]
|
||||
{
|
||||
@@ -141,12 +141,11 @@ namespace Jellyfin.Naming.Tests.Video
|
||||
|
||||
var result = StackResolver.ResolveFiles(files, _namingOptions).ToList();
|
||||
|
||||
Assert.Single(result);
|
||||
TestStackInfo(result[0], "Bad Boys (2006).stv.unrated.multi.1080p.bluray.x264-rough", 4);
|
||||
Assert.Empty(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestNumberedFiles()
|
||||
public void ResolveFiles_FileNamesWithMissingPartType_ReturnsNoStack()
|
||||
{
|
||||
var files = new[]
|
||||
{
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace Jellyfin.Naming.Tests.Video
|
||||
[Fact]
|
||||
public void TestDirectoryStack()
|
||||
{
|
||||
var stack = new FileStack();
|
||||
var stack = new FileStack(string.Empty, false, Array.Empty<string>());
|
||||
Assert.False(stack.ContainsFile("XX", true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user