From cc25bd579b820a91e436a358f38321d254c27451 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Fri, 24 Aug 2012 12:24:29 -0400 Subject: Chaged BaseItem.People to a dictionary to prevent duplicates and improve Contains performance. Tweaked ffprobe and provider execution. --- MediaBrowser.Api/ApiService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'MediaBrowser.Api/ApiService.cs') diff --git a/MediaBrowser.Api/ApiService.cs b/MediaBrowser.Api/ApiService.cs index f52141a64b..ab0f46e423 100644 --- a/MediaBrowser.Api/ApiService.cs +++ b/MediaBrowser.Api/ApiService.cs @@ -200,17 +200,17 @@ namespace MediaBrowser.Api // Attach People by transforming them into BaseItemPerson (DTO) if (item.People != null) { - IEnumerable entities = await Task.WhenAll(item.People.Select(c => Kernel.Instance.ItemController.GetPerson(c.Name))).ConfigureAwait(false); + IEnumerable entities = await Task.WhenAll(item.People.Select(c => Kernel.Instance.ItemController.GetPerson(c.Key))).ConfigureAwait(false); dto.People = item.People.Select(p => { BaseItemPerson baseItemPerson = new BaseItemPerson(); - baseItemPerson.Name = p.Name; - baseItemPerson.Overview = p.Overview; - baseItemPerson.Type = p.Type; + baseItemPerson.Name = p.Key; + baseItemPerson.Overview = p.Value.Overview; + baseItemPerson.Type = p.Value.Type; - Person ibnObject = entities.First(i => i.Name.Equals(p.Name, StringComparison.OrdinalIgnoreCase)); + Person ibnObject = entities.First(i => i.Name.Equals(p.Key, StringComparison.OrdinalIgnoreCase)); if (ibnObject != null) { -- cgit v1.2.3