mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Tweak Trickplay migration for speed (#12643)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user