update people queries

This commit is contained in:
Luke Pulverenti
2015-07-06 22:25:23 -04:00
parent 8ccd82719a
commit dfa17aec70
10 changed files with 102 additions and 26 deletions

View File

@@ -1223,6 +1223,11 @@ namespace MediaBrowser.Server.Implementations.Library
};
}
public List<Guid> GetItemIds(InternalItemsQuery query)
{
return ItemRepository.GetItemIdsList(query);
}
/// <summary>
/// Gets the intros.
/// </summary>
@@ -2057,12 +2062,28 @@ namespace MediaBrowser.Server.Implementations.Library
}
}
public List<PersonInfo> GetPeople(BaseItem item)
{
return item.People ?? ItemRepository.GetPeople(item.Id);
}
public List<Person> GetPeopleItems(BaseItem item)
{
return ItemRepository.GetPeopleNames(item.Id).Select(i =>
{
try
{
return GetPerson(i);
}
catch (Exception ex)
{
_logger.ErrorException("Error getting person", ex);
return null;
}
}).Where(i => i != null).ToList();
}
public List<PersonInfo> GetAllPeople()
{
return RootFolder.GetRecursiveChildren()