This commit is contained in:
cvium 2021-12-07 19:23:30 +01:00
parent fde84a1e00
commit 6030946d78
2 changed files with 10 additions and 2 deletions

View File

@ -276,8 +276,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
var path = firstVideo.Path;
if (video.ExtraType != null)
{
// TODO
result.ExtraFiles.Add(files.First(f => string.Equals(f.FullName, path, StringComparison.OrdinalIgnoreCase)));
result.ExtraFiles.Add(files.Find(f => string.Equals(f.FullName, path, StringComparison.OrdinalIgnoreCase)));
continue;
}

View File

@ -107,6 +107,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(2, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
}
@ -128,6 +129,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(2, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
}
@ -150,6 +152,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(3, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
Assert.Equal(ExtraType.Trailer, result[2].ExtraType);
@ -173,6 +176,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(3, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
Assert.Equal(ExtraType.Trailer, result[2].ExtraType);
@ -195,6 +199,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(2, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
}
@ -308,6 +313,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(4, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
Assert.Equal(ExtraType.Trailer, result[2].ExtraType);
@ -431,6 +437,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(2, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
}
@ -452,6 +459,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(2, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
}
@ -473,6 +481,7 @@ namespace Jellyfin.Naming.Tests.Video
}).ToList(),
_namingOptions).ToList();
Assert.Equal(2, result.Count);
Assert.False(result[0].ExtraType.HasValue);
Assert.Equal(ExtraType.Trailer, result[1].ExtraType);
}