Browse Source

Use Math.Clamp in GetGuideDays

Patrick Barron 1 year ago
parent
commit
502cbe77b2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Jellyfin.LiveTv/Guide/GuideManager.cs

+ 1 - 1
src/Jellyfin.LiveTv/Guide/GuideManager.cs

@@ -159,7 +159,7 @@ public class GuideManager : IGuideManager
         var config = _config.GetLiveTvConfiguration();
 
         return config.GuideDays.HasValue
-            ? Math.Max(1, Math.Min(config.GuideDays.Value, MaxGuideDays))
+            ? Math.Clamp(config.GuideDays.Value, 1, MaxGuideDays)
             : 7;
     }