aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Trickplay
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2024-09-23 09:09:23 -0600
committerGitHub <noreply@github.com>2024-09-23 09:09:23 -0600
commit3c639c2e80f2a17eea3f5f1a70c1b287bc99aba4 (patch)
tree0d15c42ffee4c02603be75c8dc44863b8e72da02 /Jellyfin.Server.Implementations/Trickplay
parent0539fdc5e3a164b694d12d8d3f8437e2cc5b6457 (diff)
Tweak Trickplay migration for speed (#12643)
Diffstat (limited to 'Jellyfin.Server.Implementations/Trickplay')
-rw-r--r--Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
index 861037c1f..73e31279f 100644
--- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
+++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
@@ -455,16 +455,18 @@ public class TrickplayManager : ITrickplayManager
}
/// <inheritdoc />
- public async Task<IReadOnlyList<Guid>> GetTrickplayItemsAsync()
+ public async Task<IReadOnlyList<TrickplayInfo>> GetTrickplayItemsAsync(int limit, int offset)
{
- List<Guid> trickplayItems;
+ IReadOnlyList<TrickplayInfo> trickplayItems;
var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false);
await using (dbContext.ConfigureAwait(false))
{
trickplayItems = await dbContext.TrickplayInfos
.AsNoTracking()
- .Select(i => i.ItemId)
+ .OrderBy(i => i.ItemId)
+ .Skip(offset)
+ .Take(limit)
.ToListAsync()
.ConfigureAwait(false);
}