Minor perf improvements

This commit is contained in:
Bond_009
2020-11-06 16:15:30 +01:00
parent f172b37401
commit b21919c7f4
12 changed files with 42 additions and 39 deletions

View File

@@ -316,9 +316,9 @@ namespace Jellyfin.Api.Controllers
TotalRecordCount = list.Count
};
if (limit.HasValue)
if (limit.HasValue && limit > list.Count)
{
list = list.Take(limit.Value).ToList();
list = list.GetRange(0, limit.Value);
}
var returnList = _dtoService.GetBaseItemDtos(list, dtoOptions, user);