Merge pull request #1931 from grafixeyehero/PersonServies

update persons service
This commit is contained in:
Bond-009 2019-11-01 16:38:54 +01:00 committed by GitHub
commit 443422ddb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,6 +109,11 @@ namespace MediaBrowser.Api.UserLibrary
NameContains = query.NameContains ?? query.SearchTerm NameContains = query.NameContains ?? query.SearchTerm
}); });
if (query.IsFavorite ?? false && query.User != null)
{
items = items.Where(i => UserDataRepository.GetUserData(query.User, i).IsFavorite).ToList();
}
return new QueryResult<(BaseItem, ItemCounts)> return new QueryResult<(BaseItem, ItemCounts)>
{ {
TotalRecordCount = items.Count, TotalRecordCount = items.Count,