diff options
Diffstat (limited to 'internal/feed/feed.go')
-rw-r--r-- | internal/feed/feed.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/feed/feed.go b/internal/feed/feed.go index 6b95f6e..433d080 100644 --- a/internal/feed/feed.go +++ b/internal/feed/feed.go @@ -24,6 +24,8 @@ type feedDescriptor struct { type feeditem struct { *gofeed.Feed *gofeed.Item + updateOnly bool + reasons []string } func (item feeditem) Creator() string { @@ -33,6 +35,10 @@ func (item feeditem) Creator() string { return "" } +func (item feeditem) addReason(reason string) { + item.reasons = append(item.reasons, reason) +} + func (feed *Feed) descriptor() feedDescriptor { return feedDescriptor{ Name: feed.Name, @@ -51,6 +57,12 @@ func (feed *Feed) NeedsUpdate(updateTime time.Time) bool { return true } -func (feed *Feed) Success() bool { +func (feed *Feed) FetchSuccessful() bool { return feed.feed != nil } + +func (feed *Feed) MarkSuccess() { + if feed.cached != nil { + feed.cached.Commit() + } +} |