mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-26 20:16:33 +00:00
Use enums for encoding options (#12561)
This commit is contained in:
@@ -128,7 +128,7 @@ public class DynamicHlsPlaylistGenerator : IDynamicHlsPlaylistGenerator
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static bool IsExtractionAllowedForFile(ReadOnlySpan<char> filePath, string[] allowedExtensions)
|
||||
internal static bool IsExtractionAllowedForFile(ReadOnlySpan<char> filePath, IReadOnlyList<string> allowedExtensions)
|
||||
{
|
||||
var extension = Path.GetExtension(filePath);
|
||||
if (extension.IsEmpty)
|
||||
@@ -138,7 +138,7 @@ public class DynamicHlsPlaylistGenerator : IDynamicHlsPlaylistGenerator
|
||||
|
||||
// Remove the leading dot
|
||||
var extensionWithoutDot = extension[1..];
|
||||
for (var i = 0; i < allowedExtensions.Length; i++)
|
||||
for (var i = 0; i < allowedExtensions.Count; i++)
|
||||
{
|
||||
var allowedExtension = allowedExtensions[i].AsSpan().TrimStart('.');
|
||||
if (extensionWithoutDot.Equals(allowedExtension, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
Reference in New Issue
Block a user