mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
feat(feed): implement global deduplication
Add a per-feed boolean to decide if the feed's entries should be deduplicated against all others. This is useful for aggregators like lobste.rs or hackernews. This should close #797
This commit is contained in:
parent
d2212dee12
commit
e8234033fd
8 changed files with 41 additions and 3 deletions
|
@ -71,6 +71,7 @@ func (h *handler) showEditFeedPage(w http.ResponseWriter, r *http.Request) {
|
|||
PushoverEnabled: feed.PushoverEnabled,
|
||||
PushoverPriority: feed.PushoverPriority,
|
||||
ProxyURL: feed.ProxyURL,
|
||||
DeduplicateAgainstAll: feed.DeduplicateAgainstAll,
|
||||
}
|
||||
|
||||
sess := session.New(h.store, request.SessionID(r))
|
||||
|
|
|
@ -43,6 +43,7 @@ type FeedForm struct {
|
|||
PushoverEnabled bool
|
||||
PushoverPriority int
|
||||
ProxyURL string
|
||||
DeduplicateAgainstAll bool
|
||||
}
|
||||
|
||||
// Merge updates the fields of the given feed.
|
||||
|
@ -79,6 +80,7 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
|
|||
feed.PushoverEnabled = f.PushoverEnabled
|
||||
feed.PushoverPriority = f.PushoverPriority
|
||||
feed.ProxyURL = f.ProxyURL
|
||||
feed.DeduplicateAgainstAll = f.DeduplicateAgainstAll
|
||||
return feed
|
||||
}
|
||||
|
||||
|
@ -130,5 +132,6 @@ func NewFeedForm(r *http.Request) *FeedForm {
|
|||
PushoverEnabled: r.FormValue("pushover_enabled") == "1",
|
||||
PushoverPriority: pushoverPriority,
|
||||
ProxyURL: r.FormValue("proxy_url"),
|
||||
DeduplicateAgainstAll: r.FormValue("deduplicate_against_all") == "1",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue