Skip to content

Commit

Permalink
Preserve the feed title when backfilling
Browse files Browse the repository at this point in the history
Arguably we should do that for other fields too but the only other ones that get
set on every fetch are the URL (which we pass in so we know it's correct), and
the list of authors (which shouldn't change due to pagination).
  • Loading branch information
jimporter committed Dec 10, 2024
1 parent fa40727 commit e3f27dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions elfeed-paginate.el
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ post older than SINCE, runs out of posts, or DEPTH reaches
(setf (elfeed-meta feed :canonical-url)
elfeed-curl-location)))
(let* ((feed-id (elfeed-feed-id feed))
(original-title (elfeed-feed-title feed))
(xml (elfeed-xml-parse-region (point) (point-max)))
(entries
(cl-case (elfeed-feed-type xml)
Expand All @@ -144,6 +145,8 @@ post older than SINCE, runs out of posts, or DEPTH reaches
(:rss1.0 (elfeed-entries-from-rss1.0 feed-id xml))
(otherwise (error (elfeed-handle-parse-error
url "Unknown feed type."))))))
(when (> depth 1)
(setf (elfeed-feed-title feed) original-title))
(elfeed-db-add entries)
(if-let (entries
((< depth elfeed-paginate-max-pages))
Expand Down

0 comments on commit e3f27dc

Please sign in to comment.