From b1be09242c6c82a9bf747e5256da6dd422309ad9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Jun 2015 21:10:45 -0400 Subject: update people saving --- .../Library/LibraryManager.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 351703e0c..c5171e323 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -2060,7 +2060,7 @@ namespace MediaBrowser.Server.Implementations.Library public List GetPeople(BaseItem item) { - return item.People ?? new List(); + return item.People ?? ItemRepository.GetPeople(item.Id); } public List GetAllPeople() @@ -2072,10 +2072,15 @@ namespace MediaBrowser.Server.Implementations.Library .ToList(); } - public Task UpdatePeople(BaseItem item, List people) + public async Task UpdatePeople(BaseItem item, List people) { - item.People = people; - return item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None); + await ItemRepository.UpdatePeople(item.Id, people).ConfigureAwait(false); + + if (item.People != null) + { + item.People = null; + await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false); + } } } } -- cgit v1.2.3