mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-02 21:24:15 -04:00
Call ToLower on CollectionTypeOptions.ToString
This commit is contained in:
parent
2e62c09f2e
commit
54f81c4da4
@ -1247,7 +1247,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
// TODO: @bond use a ReadOnlySpan<char> here when Enum.TryParse supports it
|
// TODO: @bond use a ReadOnlySpan<char> here when Enum.TryParse supports it
|
||||||
// https://github.com/dotnet/runtime/issues/20008
|
// https://github.com/dotnet/runtime/issues/20008
|
||||||
if (Enum.TryParse<CollectionTypeOptions>(Path.GetExtension(file), true, out var res))
|
if (Enum.TryParse<CollectionTypeOptions>(Path.GetFileNameWithoutExtension(file), true, out var res))
|
||||||
{
|
{
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -3001,7 +3001,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
if (collectionType != null)
|
if (collectionType != null)
|
||||||
{
|
{
|
||||||
var path = Path.Combine(virtualFolderPath, collectionType.ToString() + ".collection");
|
var path = Path.Combine(virtualFolderPath, collectionType.ToString().ToLowerInvariant() + ".collection");
|
||||||
|
|
||||||
File.WriteAllBytes(path, Array.Empty<byte>());
|
File.WriteAllBytes(path, Array.Empty<byte>());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user