1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Use image included in feed as feed icon

This commit is contained in:
Ryan Stafford 2023-06-04 18:01:59 -04:00 committed by GitHub
parent 228bb62df4
commit 1aeb1b20da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 92 additions and 28 deletions

View file

@ -27,6 +27,7 @@ type rssFeed struct {
Version string `xml:"version,attr"`
Title string `xml:"channel>title"`
Links []rssLink `xml:"channel>link"`
ImageURL string `xml:"channel>image>url"`
Language string `xml:"channel>language"`
Description string `xml:"channel>description"`
PubDate string `xml:"channel>pubDate"`
@ -58,6 +59,8 @@ func (r *rssFeed) Transform(baseURL string) *model.Feed {
feed.Title = feed.SiteURL
}
feed.IconURL = strings.TrimSpace(r.ImageURL)
for _, item := range r.Items {
entry := item.Transform()
if entry.Author == "" {