update people editing

This commit is contained in:
Luke Pulverenti
2017-06-06 02:13:49 -04:00
parent 8a780bc023
commit 7bc2a9a081
5 changed files with 53 additions and 24 deletions

View File

@@ -206,15 +206,16 @@ namespace MediaBrowser.Api
var newLockData = request.LockData ?? false;
var isLockedChanged = item.IsLocked != newLockData;
UpdateItem(request, item);
await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
// Do this first so that metadata savers can pull the updates from the database.
if (request.People != null)
{
await _libraryManager.UpdatePeople(item, request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList());
}
UpdateItem(request, item);
await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
if (isLockedChanged && item.IsFolder)
{
var folder = (Folder)item;