diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 13 |
1 files changed, 9 insertions, 4 deletions
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<PersonInfo> GetPeople(BaseItem item) { - return item.People ?? new List<PersonInfo>(); + return item.People ?? ItemRepository.GetPeople(item.Id); } public List<PersonInfo> GetAllPeople() @@ -2072,10 +2072,15 @@ namespace MediaBrowser.Server.Implementations.Library .ToList(); } - public Task UpdatePeople(BaseItem item, List<PersonInfo> people) + public async Task UpdatePeople(BaseItem item, List<PersonInfo> 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); + } } } } |
