diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-02-24 02:05:12 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-02-24 02:05:12 +0100 |
| commit | 914e891689af38911332d14b18b4a1b4834cd9ae (patch) | |
| tree | 5b4b3971a2840027e2de539d2a2c7527b135bb13 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | 92e5a5c6e8a81c3d604a943628fcb56f3778b042 (diff) | |
Fix unchecked input
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index db27862ce..03da1add8 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2956,7 +2956,7 @@ namespace Emby.Server.Implementations.Library throw new InvalidOperationException(); } - public async Task AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary) + public async Task AddVirtualFolder(string name, CollectionTypeOptions? collectionType, LibraryOptions options, bool refreshLibrary) { if (string.IsNullOrWhiteSpace(name)) { @@ -2990,9 +2990,9 @@ namespace Emby.Server.Implementations.Library { Directory.CreateDirectory(virtualFolderPath); - if (!string.IsNullOrEmpty(collectionType)) + if (collectionType != null) { - var path = Path.Combine(virtualFolderPath, collectionType + ".collection"); + var path = Path.Combine(virtualFolderPath, collectionType.ToString() + ".collection"); File.WriteAllBytes(path, Array.Empty<byte>()); } |
