fix query by multiple ids

This commit is contained in:
Luke Pulverenti
2016-03-20 17:32:26 -04:00
parent f4d61ddcc6
commit a2a0e1ae75
3 changed files with 38 additions and 11 deletions

View File

@@ -55,7 +55,7 @@ namespace MediaBrowser.Server.Implementations.Channels
}
await CleanDatabase(cancellationToken).ConfigureAwait(false);
progress.Report(100);
}
@@ -167,10 +167,14 @@ namespace MediaBrowser.Server.Implementations.Channels
{
var item = _libraryManager.GetItemById(id);
if (item == null)
{
return Task.FromResult(true);
}
return _libraryManager.DeleteItem(item, new DeleteOptions
{
DeleteFileLocation = false
});
}

View File

@@ -369,9 +369,14 @@ namespace MediaBrowser.Server.Implementations.Library
public async Task DeleteItem(BaseItem item, DeleteOptions options)
{
if (item == null)
{
throw new ArgumentNullException("item");
}
_logger.Debug("Deleting item, Type: {0}, Name: {1}, Path: {2}, Id: {3}",
item.GetType().Name,
item.Name,
item.Name ?? "Unknown name",
item.Path ?? string.Empty,
item.Id);