Use Math.Clamp in GetGuideDays

This commit is contained in:
Patrick Barron 2024-01-17 12:10:09 -05:00
parent 4399b51dca
commit 502cbe77b2

View File

@ -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;
}