mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 19:08:27 +01:00
Merge pull request #5407 from Bond-009/hack
(cherry picked from commit 90cdd1345d)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
3c3b536e81
commit
f6e8493d69
@@ -1247,7 +1247,7 @@ namespace Emby.Server.Implementations.Library
|
||||
{
|
||||
// TODO: @bond use a ReadOnlySpan<char> here when Enum.TryParse supports it
|
||||
// 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;
|
||||
}
|
||||
@@ -2953,7 +2953,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
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>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user