aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-02-24 11:57:04 +0100
committerBond_009 <bond.009@outlook.com>2021-02-24 11:57:04 +0100
commit81f527f8083289ce8eab77d522f51f06c3a5a70c (patch)
tree6fd9f9cf61c8b0e0257f9ad6f9a6822bb50fcf1f
parent1c74e2f40e6790621ebc06dd37083a29be2459bd (diff)
CollectionType can be null
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs4
-rw-r--r--MediaBrowser.Model/Entities/VirtualFolderInfo.cs2
2 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 799f8abc3..d9ffe64b3 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -1240,7 +1240,7 @@ namespace Emby.Server.Implementations.Library
return info;
}
- private CollectionTypeOptions GetCollectionType(string path)
+ private CollectionTypeOptions? GetCollectionType(string path)
{
var files = _fileSystem.GetFilePaths(path, new[] { ".collection" }, true, false);
foreach (var file in files)
@@ -1253,7 +1253,7 @@ namespace Emby.Server.Implementations.Library
}
}
- throw new FileNotFoundException("Coudn't find an appropriate collection type file.");
+ return null;
}
/// <summary>
diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
index 55879b2e0..ea3df3726 100644
--- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
+++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
@@ -35,7 +35,7 @@ namespace MediaBrowser.Model.Entities
/// Gets or sets the type of the collection.
/// </summary>
/// <value>The type of the collection.</value>
- public CollectionTypeOptions CollectionType { get; set; }
+ public CollectionTypeOptions? CollectionType { get; set; }
public LibraryOptions LibraryOptions { get; set; }