Merge pull request #17 from frequency/master
fix off by one slice index when checking SkipDays of rss feed
This commit is contained in:
commit
fae240c50c
2
feed.go
2
feed.go
|
@ -183,7 +183,7 @@ func (this *Feed) CanUpdate() bool {
|
||||||
|
|
||||||
// If skipDays or skipHours are set in the RSS feed, use these to see if
|
// If skipDays or skipHours are set in the RSS feed, use these to see if
|
||||||
// we can update.
|
// we can update.
|
||||||
if len(this.Channels) == 0 && this.Type == "rss" {
|
if len(this.Channels) == 1 && this.Type == "rss" {
|
||||||
if this.EnforceCacheLimit && len(this.Channels[0].SkipDays) > 0 {
|
if this.EnforceCacheLimit && len(this.Channels[0].SkipDays) > 0 {
|
||||||
for _, v := range this.Channels[0].SkipDays {
|
for _, v := range this.Channels[0].SkipDays {
|
||||||
if time.Weekday(v) == utc.Weekday() {
|
if time.Weekday(v) == utc.Weekday() {
|
||||||
|
|
Loading…
Reference in New Issue