aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Activity
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-01-20 08:46:17 -0700
committerCody Robibero <cody@robibe.ro>2022-01-20 08:53:06 -0700
commita60cb280a3d31ba19ffb3a94cf83ef300a7473b7 (patch)
tree5d8df85ae958dd4ed1c4b8c5c8f568d0c82ce405 /Jellyfin.Server.Implementations/Activity
parentcd4587b43f9831a9529ddaed50ba4b9935fa061b (diff)
Properly populate QueryResult
Diffstat (limited to 'Jellyfin.Server.Implementations/Activity')
-rw-r--r--Jellyfin.Server.Implementations/Activity/ActivityManager.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
index ba2c8b54f..4447b212d 100644
--- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
+++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
@@ -59,17 +59,16 @@ namespace Jellyfin.Server.Implementations.Activity
entries = entries.Where(entry => entry.UserId != Guid.Empty == query.HasUserId.Value );
}
- return new QueryResult<ActivityLogEntry>
- {
- Items = await entries
+ return new QueryResult<ActivityLogEntry>(
+ query.Skip,
+ await entries.CountAsync().ConfigureAwait(false),
+ await entries
.Skip(query.Skip ?? 0)
.Take(query.Limit ?? 100)
.AsAsyncEnumerable()
.Select(ConvertToOldModel)
.ToListAsync()
- .ConfigureAwait(false),
- TotalRecordCount = await entries.CountAsync().ConfigureAwait(false)
- };
+ .ConfigureAwait(false));
}
/// <inheritdoc />