diff --git a/internal/model/feed.go b/internal/model/feed.go index 9f1de1eb..1682b111 100644 --- a/internal/model/feed.go +++ b/internal/model/feed.go @@ -123,8 +123,8 @@ func (f *Feed) ScheduleNextCheck(weeklyCount int, refreshDelayInMinutes int) { intervalMinutes = config.Opts.SchedulerEntryFrequencyMaxInterval() } else { intervalMinutes = int(math.Round(float64(7*24*60) / float64(weeklyCount*config.Opts.SchedulerEntryFrequencyFactor()))) - intervalMinutes = int(math.Min(float64(intervalMinutes), float64(config.Opts.SchedulerEntryFrequencyMaxInterval()))) - intervalMinutes = int(math.Max(float64(intervalMinutes), float64(config.Opts.SchedulerEntryFrequencyMinInterval()))) + intervalMinutes = min(intervalMinutes, config.Opts.SchedulerEntryFrequencyMaxInterval()) + intervalMinutes = max(intervalMinutes, config.Opts.SchedulerEntryFrequencyMinInterval()) } } diff --git a/internal/reader/readability/readability.go b/internal/reader/readability/readability.go index 299211f5..18f30ded 100644 --- a/internal/reader/readability/readability.go +++ b/internal/reader/readability/readability.go @@ -8,7 +8,6 @@ import ( "fmt" "io" "log/slog" - "math" "regexp" "strings" @@ -108,7 +107,7 @@ func ExtractContent(page io.Reader) (baseURL string, extractedContent string, er // Things like preambles, content split by ads that we removed, etc. func getArticle(topCandidate *candidate, candidates candidateList) string { output := bytes.NewBufferString("