diff options
Diffstat (limited to 'internal/feed/feed.go')
-rw-r--r-- | internal/feed/feed.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/feed/feed.go b/internal/feed/feed.go index d087d3a..4ee2875 100644 --- a/internal/feed/feed.go +++ b/internal/feed/feed.go @@ -34,7 +34,10 @@ func (feed *Feed) descriptor() feedDescriptor { } func (feed *Feed) NeedsUpdate(updateTime time.Time) bool { - if !updateTime.IsZero() && int(time.Since(updateTime).Hours()) >= *feed.MinFreq { + if *feed.MinFreq == 0 { // shortcut + return true + } + if !updateTime.IsZero() && int(time.Since(updateTime).Hours()) < *feed.MinFreq { log.Printf("Feed '%s' does not need updating, skipping.", feed.Name) return false } |