This commit is contained in:
Shadowghost 2024-06-05 01:12:47 +02:00
parent 57ae0b5796
commit 918a36d564

View File

@ -575,18 +575,22 @@ namespace Jellyfin.Providers.Tests.Manager
// Has to exist for querying DateModified time on file, results stored but not checked so not populating // Has to exist for querying DateModified time on file, results stored but not checked so not populating
BaseItem.FileSystem ??= Mock.Of<IFileSystem>(); BaseItem.FileSystem ??= Mock.Of<IFileSystem>();
var item = new Video(); var item = new Mock<Video>
{
CallBase = true
};
item.Setup(m => m.IsSaveLocalMetadataEnabled()).Returns(false);
var path = validPaths ? _testDataImagePath.Format : "invalid path {0}"; var path = validPaths ? _testDataImagePath.Format : "invalid path {0}";
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
item.SetImagePath(type, i, new FileSystemMetadata item.Object.SetImagePath(type, i, new FileSystemMetadata
{ {
FullName = string.Format(CultureInfo.InvariantCulture, path, i), FullName = string.Format(CultureInfo.InvariantCulture, path, i),
}); });
} }
return item; return item.Object;
} }
private static ILocalImageProvider GetImageProvider(ImageType type, int count, bool validPaths) private static ILocalImageProvider GetImageProvider(ImageType type, int count, bool validPaths)