mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-13 04:06:31 +01:00
Merge pull request #16322 from poytiis/remove-ToList-calls
Remove unnecessary ToList calls in TrickplayManager
This commit is contained in:
@@ -118,6 +118,7 @@
|
||||
- [Phlogi](https://github.com/Phlogi)
|
||||
- [pjeanjean](https://github.com/pjeanjean)
|
||||
- [ploughpuff](https://github.com/ploughpuff)
|
||||
- [poytiis](https://github.com/poytiis)
|
||||
- [pR0Ps](https://github.com/pR0Ps)
|
||||
- [PrplHaz4](https://github.com/PrplHaz4)
|
||||
- [RazeLighter777](https://github.com/RazeLighter777)
|
||||
|
||||
@@ -198,13 +198,13 @@ public class TrickplayManager : ITrickplayManager
|
||||
// Cleanup old trickplay files
|
||||
if (Directory.Exists(trickplayDirectory))
|
||||
{
|
||||
var existingFolders = Directory.GetDirectories(trickplayDirectory).ToList();
|
||||
var existingFolders = Directory.GetDirectories(trickplayDirectory);
|
||||
var trickplayInfos = await dbContext.TrickplayInfos
|
||||
.AsNoTracking()
|
||||
.Where(i => i.ItemId.Equals(video.Id))
|
||||
.ToListAsync(cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
var expectedFolders = trickplayInfos.Select(i => GetTrickplayDirectory(video, i.TileWidth, i.TileHeight, i.Width, saveWithMedia)).ToList();
|
||||
var expectedFolders = trickplayInfos.Select(i => GetTrickplayDirectory(video, i.TileWidth, i.TileHeight, i.Width, saveWithMedia));
|
||||
var foldersToRemove = existingFolders.Except(expectedFolders);
|
||||
foreach (var folder in foldersToRemove)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user