aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs4
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs9
2 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index df0f0045e..e4cb58346 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -1536,6 +1536,10 @@ namespace MediaBrowser.Server.Implementations.Library
{
video = dbItem;
}
+ else
+ {
+ return null;
+ }
}
}
catch (Exception ex)
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
index 26cde925e..2161c1454 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
@@ -165,11 +165,14 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var item = _libraryManager.GetItemById(id);
- await _libraryManager.DeleteItem(item, new DeleteOptions
+ if (item != null)
{
- DeleteFileLocation = false
+ await _libraryManager.DeleteItem(item, new DeleteOptions
+ {
+ DeleteFileLocation = false
- }).ConfigureAwait(false);
+ }).ConfigureAwait(false);
+ }
}
progress.Report(100);