Use Math.Clamp in GetGuideDays
This commit is contained in:
parent
4399b51dca
commit
502cbe77b2
|
@ -159,7 +159,7 @@ public class GuideManager : IGuideManager
|
||||||
var config = _config.GetLiveTvConfiguration();
|
var config = _config.GetLiveTvConfiguration();
|
||||||
|
|
||||||
return config.GuideDays.HasValue
|
return config.GuideDays.HasValue
|
||||||
? Math.Max(1, Math.Min(config.GuideDays.Value, MaxGuideDays))
|
? Math.Clamp(config.GuideDays.Value, 1, MaxGuideDays)
|
||||||
: 7;
|
: 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user