start people update

This commit is contained in:
Luke Pulverenti
2015-06-20 23:35:22 -04:00
parent 64bdf13434
commit 8bb10cb12f
34 changed files with 176 additions and 129 deletions

View File

@@ -218,6 +218,11 @@ namespace MediaBrowser.Api
await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
if (request.People != null)
{
await _libraryManager.UpdatePeople(item, request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList());
}
if (isLockedChanged && item.IsFolder)
{
var folder = (Folder)item;
@@ -303,11 +308,6 @@ namespace MediaBrowser.Api
item.Studios = request.Studios.Select(x => x.Name).ToList();
}
if (request.People != null)
{
item.People = request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList();
}
if (request.DateCreated.HasValue)
{
item.DateCreated = NormalizeDateTime(request.DateCreated.Value);