aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2024-04-17 18:44:50 +0200
committerGitHub <noreply@github.com>2024-04-17 10:44:50 -0600
commitbb018c4adc7916fafb7dac2db9a902be8d20e75d (patch)
treeeb15d41547a4cf5a1753ff4f70bea581152b15db /Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
parent356e05e3af7702b7dfefbba6e936d602c3638055 (diff)
Enable nullable for LibraryManager (#11191)
Diffstat (limited to 'Emby.Server.Implementations/Library/Validators/PeopleValidator.cs')
-rw-r--r--Emby.Server.Implementations/Library/Validators/PeopleValidator.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
index 601aab5b9..725b8f76c 100644
--- a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
+++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
@@ -64,6 +64,11 @@ namespace Emby.Server.Implementations.Library.Validators
try
{
var item = _libraryManager.GetPerson(person);
+ if (item is null)
+ {
+ _logger.LogWarning("Failed to get person: {Name}", person);
+ continue;
+ }
var options = new MetadataRefreshOptions(new DirectoryService(_fileSystem))
{
@@ -92,7 +97,7 @@ namespace Emby.Server.Implementations.Library.Validators
var deadEntities = _libraryManager.GetItemList(new InternalItemsQuery
{
- IncludeItemTypes = new[] { BaseItemKind.Person },
+ IncludeItemTypes = [BaseItemKind.Person],
IsDeadPerson = true,
IsLocked = false
});