CollectionType can be null

This commit is contained in:
Bond_009 2021-02-24 11:57:04 +01:00
parent 1c74e2f40e
commit 81f527f808
2 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -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; }