diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-03-08 12:08:17 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-03-08 12:08:17 +0100 |
| commit | 54f81c4da484e3bb3d62669f0216c2a3a239166d (patch) | |
| tree | f4699eb095f4630c0c50c32748670d152137dacb | |
| parent | 2e62c09f2e55b33c2ba8eeb97157495e2f8ab5a9 (diff) | |
Call ToLower on CollectionTypeOptions.ToString
| -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 d9ffe64b3..6d92e12b3 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; } @@ -3001,7 +3001,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>()); } |
