mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 12:58:28 +01:00
Properly populate QueryResult
This commit is contained in:
@@ -145,12 +145,10 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
devices = devices.Take(query.Limit.Value);
|
||||
}
|
||||
|
||||
return new QueryResult<Device>
|
||||
{
|
||||
Items = await devices.ToListAsync().ConfigureAwait(false),
|
||||
StartIndex = query.Skip ?? 0,
|
||||
TotalRecordCount = count
|
||||
};
|
||||
return new QueryResult<Device>(
|
||||
query.Skip,
|
||||
count,
|
||||
await devices.ToListAsync().ConfigureAwait(false));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -158,12 +156,10 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
{
|
||||
var devices = await GetDevices(query).ConfigureAwait(false);
|
||||
|
||||
return new QueryResult<DeviceInfo>
|
||||
{
|
||||
Items = devices.Items.Select(device => ToDeviceInfo(device)).ToList(),
|
||||
StartIndex = devices.StartIndex,
|
||||
TotalRecordCount = devices.TotalRecordCount
|
||||
};
|
||||
return new QueryResult<DeviceInfo>(
|
||||
devices.StartIndex,
|
||||
devices.TotalRecordCount,
|
||||
devices.Items.Select(device => ToDeviceInfo(device)).ToList());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user