diff options
Diffstat (limited to 'core/structs.go')
| -rw-r--r-- | core/structs.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/structs.go b/core/structs.go index caab676..b9624a2 100644 --- a/core/structs.go +++ b/core/structs.go @@ -82,7 +82,10 @@ func GofeedConvert(f *gofeed.Feed, title string) (*Feed, error) { } item.Link = v.Link - new.Items = append(new.Items, item) + // don't insert if older than 1 year + if item.Published.After(time.Now().AddDate(-1, 0, 0)) { + new.Items = append(new.Items, item) + } } return new, nil |
