mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-14 04:53:02 +03:00
Minor perf improvements
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user