diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-03-08 21:23:14 +0100 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2021-03-08 18:08:26 -0500 |
| commit | f6e8493d690fe9cc353c4c381a1bac2696bd7f83 (patch) | |
| tree | 75c0bdcf6f6b5fe5649e944596317ae115ddb456 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | 3c3b536e81eee787c2a0cbbc2ea0b7e26ccb6f1f (diff) | |
Merge pull request #5407 from Bond-009/hack
(cherry picked from commit 90cdd1345dde15f987550c57c12fcd8e57af0de1)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 0957b8cf7..46a7feb7f 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -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>()); } |
