mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Refactor and add scheduled task
This commit is contained in:
@@ -38,8 +38,8 @@ namespace Jellyfin.MediaEncoding.Hls.Tests.Playlist
|
||||
|
||||
[Theory]
|
||||
[InlineData("testfile.mkv", new string[0], false)]
|
||||
[InlineData("testfile.flv", new[] { "mp4", "mkv", "ts" }, false)]
|
||||
[InlineData("testfile.flv", new[] { "mp4", "mkv", "ts", "flv" }, true)]
|
||||
[InlineData("testfile.flv", new[] { ".mp4", ".mkv", ".ts" }, false)]
|
||||
[InlineData("testfile.flv", new[] { ".mp4", ".mkv", ".ts", ".flv" }, true)]
|
||||
[InlineData("/some/arbitrarily/long/path/testfile.mkv", new[] { "mkv" }, true)]
|
||||
public void IsExtractionAllowedForFile_Valid_Success(string filePath, string[] allowedExtensions, bool isAllowed)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ namespace Jellyfin.MediaEncoding.Hls.Tests.Playlist
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("testfile", new[] { "mp4" })]
|
||||
[InlineData("testfile", new[] { ".mp4" })]
|
||||
public void IsExtractionAllowedForFile_Invalid_ReturnsFalse(string filePath, string[] allowedExtensions)
|
||||
{
|
||||
Assert.False(DynamicHlsPlaylistGenerator.IsExtractionAllowedForFile(filePath, allowedExtensions));
|
||||
|
||||
Reference in New Issue
Block a user