diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-03-08 21:23:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-08 21:23:14 +0100 |
| commit | 90cdd1345dde15f987550c57c12fcd8e57af0de1 (patch) | |
| tree | fdd25759a5174721c16b840895bb55f3c086f31c /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | 480dd66428e2a8bf76c0747256f2e99b15aae212 (diff) | |
| parent | 54f81c4da484e3bb3d62669f0216c2a3a239166d (diff) | |
Merge pull request #5407 from Bond-009/hack
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>()); } |
