mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +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
|
@ -60,6 +60,7 @@ type Feed struct {
|
|||
PushoverEnabled bool `json:"pushover_enabled"`
|
||||
PushoverPriority int `json:"pushover_priority"`
|
||||
ProxyURL string `json:"proxy_url"`
|
||||
DeduplicateAgainstAll bool `json:"deduplicate_against_all"`
|
||||
|
||||
// Non-persisted attributes
|
||||
Category *Category `json:"category,omitempty"`
|
||||
|
@ -170,6 +171,7 @@ type FeedCreationRequest struct {
|
|||
UrlRewriteRules string `json:"urlrewrite_rules"`
|
||||
DisableHTTP2 bool `json:"disable_http2"`
|
||||
ProxyURL string `json:"proxy_url"`
|
||||
DeduplicateAgainstAll bool `json:"deduplicate_against_all"`
|
||||
}
|
||||
|
||||
type FeedCreationRequestFromSubscriptionDiscovery struct {
|
||||
|
@ -205,6 +207,7 @@ type FeedModificationRequest struct {
|
|||
HideGlobally *bool `json:"hide_globally"`
|
||||
DisableHTTP2 *bool `json:"disable_http2"`
|
||||
ProxyURL *string `json:"proxy_url"`
|
||||
DeduplicateAgainstAll *bool `json:"deduplicate_against_all"`
|
||||
}
|
||||
|
||||
// Patch updates a feed with modified values.
|
||||
|
@ -300,6 +303,10 @@ func (f *FeedModificationRequest) Patch(feed *Feed) {
|
|||
if f.ProxyURL != nil {
|
||||
feed.ProxyURL = *f.ProxyURL
|
||||
}
|
||||
|
||||
if f.DeduplicateAgainstAll != nil {
|
||||
feed.DeduplicateAgainstAll = *f.DeduplicateAgainstAll
|
||||
}
|
||||
}
|
||||
|
||||
// Feeds is a list of feed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue