aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-02-27 19:45:15 -0700
committerCody Robibero <cody@robibe.ro>2022-02-28 08:22:52 -0700
commit40e413d575236ce12c7d4824fb07da6d812b8f05 (patch)
tree0a67afe6675e2994add55bacea979452b4d55906 /tests
parente26446f9c06d23d483d7c3db40888d51d37fdcdc (diff)
Only add internal files if the internal metadata path exists
Signed-off-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Providers.Tests/MediaInfo/MediaInfoResolverTests.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Jellyfin.Providers.Tests/MediaInfo/MediaInfoResolverTests.cs b/tests/Jellyfin.Providers.Tests/MediaInfo/MediaInfoResolverTests.cs
index 926ec5c91..9cc6e5e99 100644
--- a/tests/Jellyfin.Providers.Tests/MediaInfo/MediaInfoResolverTests.cs
+++ b/tests/Jellyfin.Providers.Tests/MediaInfo/MediaInfoResolverTests.cs
@@ -150,6 +150,8 @@ public class MediaInfoResolverTests
var directoryService = new Mock<IDirectoryService>(MockBehavior.Strict);
directoryService.Setup(ds => ds.GetFilePaths(It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<bool>()))
.Returns(Array.Empty<string>());
+ directoryService.Setup(ds => ds.PathExists(It.IsAny<string>()))
+ .Returns(true);
var mediaEncoder = Mock.Of<IMediaEncoder>(MockBehavior.Strict);
@@ -299,6 +301,10 @@ public class MediaInfoResolverTests
.Returns(files);
directoryService.Setup(ds => ds.GetFilePaths(It.IsRegex(MetadataDirectoryRegex), It.IsAny<bool>(), It.IsAny<bool>()))
.Returns(Array.Empty<string>());
+ directoryService.Setup(ds => ds.PathExists(It.IsRegex(MetadataDirectoryRegex)))
+ .Returns(true);
+ directoryService.Setup(ds => ds.PathExists(It.IsRegex(VideoDirectoryRegex)))
+ .Returns(true);
List<MediaStream> GenerateMediaStreams()
{
@@ -370,6 +376,11 @@ public class MediaInfoResolverTests
.Returns(Array.Empty<string>());
}
+ directoryService.Setup(ds => ds.PathExists(It.IsRegex(MetadataDirectoryRegex)))
+ .Returns(true);
+ directoryService.Setup(ds => ds.PathExists(It.IsRegex(VideoDirectoryRegex)))
+ .Returns(true);
+
return directoryService.Object;
}
}