Made use of SecondsTillUpdate()
Increases code comprehensibility
This commit is contained in:
parent
21cabd67c6
commit
525d2bdc03
5
feed.go
5
feed.go
|
@ -226,11 +226,12 @@ func (this *Feed) notifyListeners() {
|
|||
func (this *Feed) CanUpdate() bool {
|
||||
// Make sure we are not within the specified cache-limit.
|
||||
// This ensures we don't request data too often.
|
||||
utc := time.Now().UTC()
|
||||
if utc.UnixNano()-this.lastupdate < int64(this.CacheTimeout*60) {
|
||||
if SecondsTillUpdate() > 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
utc := time.Now().UTC()
|
||||
|
||||
// If skipDays or skipHours are set in the RSS feed, use these to see if
|
||||
// we can update.
|
||||
if len(this.Channels) == 1 && this.Type == "rss" {
|
||||
|
|
Loading…
Reference in New Issue