diff options
| author | Odd Stråbø <oddstr13@openshell.no> | 2020-07-26 23:02:11 +0200 |
|---|---|---|
| committer | Odd Stråbø <oddstr13@openshell.no> | 2020-07-26 23:03:16 +0200 |
| commit | 7fa80ac3e0695eaf279eeef6ac643044f0e399ba (patch) | |
| tree | 86c1041f2be6c376a66eab3b314323957290678c | |
| parent | de708d2fca268eb470b34013f4a52493e34908a1 (diff) | |
Add more tests, update comment
| -rw-r--r-- | Emby.Server.Implementations/Library/IgnorePatterns.cs | 1 | ||||
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/IgnorePatterns.cs b/Emby.Server.Implementations/Library/IgnorePatterns.cs index 9ba96818a..8a85c852a 100644 --- a/Emby.Server.Implementations/Library/IgnorePatterns.cs +++ b/Emby.Server.Implementations/Library/IgnorePatterns.cs @@ -19,6 +19,7 @@ namespace Emby.Server.Implementations.Library "**/small.jpg", "**/albumart.jpg", + // We have neither non-greedy matching or character group repetitions, working around that here. // https://github.com/dazinator/DotNet.Glob#patterns "**/*.sample.?", "**/*.sample.??", diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs index e52b40be5..b4e6db8f3 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs @@ -28,6 +28,10 @@ namespace Jellyfin.Server.Implementations.Tests.Library [InlineData("/directory/@Recycle/file.mp3", true)] [InlineData("/media/movies/.@__thumb", true)] [InlineData("/media/movies/.@__thumb/foo-bar-thumbnail.png", true)] + [InlineData("/media/music/Foo B.A.R./epic.flac", false)] + [InlineData("/media/music/Foo B.A.R", false)] + // This test is pending an upstream fix: https://github.com/dazinator/DotNet.Glob/issues/78 + // [InlineData("/media/music/Foo B.A.R.", false)] public void PathIgnored(string path, bool expected) { Assert.Equal(expected, IgnorePatterns.ShouldIgnore(path)); |
