diff options
author | 2023-10-22 16:07:06 -0700 | |
---|---|---|
committer | 2023-10-22 18:05:37 -0700 | |
commit | eeaab72a9f76363eed3374bb784581b8e08c65d8 (patch) | |
tree | 43d4b2b7aa45881391429bf0fed4aef8908fbcfc /internal/model/feed.go | |
parent | 14e25ab9fe09b9951b38e56af2bdff7a0737b280 (diff) | |
download | v2-eeaab72a9f76363eed3374bb784581b8e08c65d8.tar.gz v2-eeaab72a9f76363eed3374bb784581b8e08c65d8.tar.zst v2-eeaab72a9f76363eed3374bb784581b8e08c65d8.zip |
Refactor feed discovery and avoid an extra HTTP request if the url provided is the feed
Diffstat (limited to 'internal/model/feed.go')
-rw-r--r-- | internal/model/feed.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/internal/model/feed.go b/internal/model/feed.go index 88560a27..6a76411e 100644 --- a/internal/model/feed.go +++ b/internal/model/feed.go @@ -5,6 +5,7 @@ package model // import "miniflux.app/v2/internal/model" import ( "fmt" + "io" "math" "time" @@ -144,6 +145,31 @@ type FeedCreationRequest struct { UrlRewriteRules string `json:"urlrewrite_rules"` } +type FeedCreationRequestFromSubscriptionDiscovery struct { + Content io.ReadSeeker + ETag string + LastModified string + + FeedURL string `json:"feed_url"` + CategoryID int64 `json:"category_id"` + UserAgent string `json:"user_agent"` + Cookie string `json:"cookie"` + Username string `json:"username"` + Password string `json:"password"` + Crawler bool `json:"crawler"` + Disabled bool `json:"disabled"` + NoMediaPlayer bool `json:"no_media_player"` + IgnoreHTTPCache bool `json:"ignore_http_cache"` + AllowSelfSignedCertificates bool `json:"allow_self_signed_certificates"` + FetchViaProxy bool `json:"fetch_via_proxy"` + ScraperRules string `json:"scraper_rules"` + RewriteRules string `json:"rewrite_rules"` + BlocklistRules string `json:"blocklist_rules"` + KeeplistRules string `json:"keeplist_rules"` + HideGlobally bool `json:"hide_globally"` + UrlRewriteRules string `json:"urlrewrite_rules"` +} + // FeedModificationRequest represents the request to update a feed. type FeedModificationRequest struct { FeedURL *string `json:"feed_url"` |