aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/state.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 17:52:55 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 17:52:55 +0200
commit63d20f3f7b02f33475049c12e03569a4f67fe810 (patch)
tree42cf1c8bd5d839a410c106c8a1d86b4d4180db37 /internal/feed/state.go
parent9e69c102b596924d589693ce537c4fecae3aa44c (diff)
downloadfeed2imap-go-63d20f3f7b02f33475049c12e03569a4f67fe810.tar.gz
feed2imap-go-63d20f3f7b02f33475049c12e03569a4f67fe810.tar.bz2
feed2imap-go-63d20f3f7b02f33475049c12e03569a4f67fe810.zip
Options: "disable" and "ignore-hash"
Diffstat (limited to '')
-rw-r--r--internal/feed/state.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/feed/state.go b/internal/feed/state.go
index 6f284ad..ea9239a 100644
--- a/internal/feed/state.go
+++ b/internal/feed/state.go
@@ -72,7 +72,7 @@ func filterFeed(feed *Feed) {
origLen := len(feed.items)
log.Debugf("Filtering %s. Starting with %d items", feed.Name, origLen)
- items := feed.cached.filterItems(feed.items)
+ items := feed.cached.filterItems(feed.items, *feed.Options.IgnHash)
feed.items = items
newLen := len(feed.items)
@@ -112,7 +112,7 @@ func NewState(cfg *config.Config) *State {
func (state *State) RemoveUndue() {
for name, feed := range state.feeds {
- if !feed.NeedsUpdate(feed.cached.Last()) {
+ if *feed.Options.Disable || !feed.NeedsUpdate(feed.cached.Last()) {
delete(state.feeds, name)
}
}