From d63b2b2657763112fb1581a667c111e3930889f2 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sun, 22 Feb 2026 12:37:14 +0100 Subject: Apply review suggestion --- src/Jellyfin.LiveTv/Guide/GuideManager.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Jellyfin.LiveTv/Guide/GuideManager.cs b/src/Jellyfin.LiveTv/Guide/GuideManager.cs index 7e1992baf2..47aa31c0f6 100644 --- a/src/Jellyfin.LiveTv/Guide/GuideManager.cs +++ b/src/Jellyfin.LiveTv/Guide/GuideManager.cs @@ -742,9 +742,13 @@ public class GuideManager : IGuideManager private async Task PreCacheImages(IReadOnlyList programs, DateTime maxCacheDate) { + var sdLimitActive = IsSdImageLimitActive(); + await Parallel.ForEachAsync( programs .Where(p => p.EndDate.HasValue && p.EndDate.Value < maxCacheDate) + .Where(p => !sdLimitActive || !p.ImageInfos.All( + img => img.IsLocalFile || img.Path.Contains("schedulesdirect", StringComparison.OrdinalIgnoreCase))) .DistinctBy(p => p.Id), _cacheParallelOptions, async (program, cancellationToken) => -- cgit v1.2.3