mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 18:53:27 +01:00
Fix warnings, improve performance (#1665)
* Fix warnings, improve performance `QueryResult.Items` is now a `IReadOnlyList` so we don't need to allocate a new `Array` when we have a `List` (and `Items` shouldn't need to be mutable anyway) * Update Providers .csproj to latest C# * Remove extra newline from DtoService.cs * Remove extra newline from UserLibraryService.cs
This commit is contained in:
@@ -189,11 +189,9 @@ namespace MediaBrowser.Api
|
||||
|
||||
var dtos = _dtoService.GetBaseItemDtos(items.Select(i => i.Item2).ToList(), dtoOptions, user);
|
||||
|
||||
var index = 0;
|
||||
foreach (var item in dtos)
|
||||
for (int index = 0; index < dtos.Count; index++)
|
||||
{
|
||||
item.PlaylistItemId = items[index].Item1.Id;
|
||||
index++;
|
||||
dtos[index].PlaylistItemId = items[index].Item1.Id;
|
||||
}
|
||||
|
||||
var result = new QueryResult<BaseItemDto>
|
||||
|
||||
Reference in New Issue
Block a user