Add image from jsonfeed

This commit is contained in:
Peter Stuifzand 2018-04-08 20:46:01 +02:00
parent d1afcd121e
commit 24c6cb0672
2 changed files with 2 additions and 0 deletions

View File

@ -277,6 +277,7 @@ func (b *memoryBackend) feedItems(fetchURL, contentType string, body io.Reader)
item.Id = hex.EncodeToString([]byte(feedItem.ID))
item.Published = feedItem.DatePublished
item.Author = author
item.Photo = feedItem.Image
items = append(items, item)
}
} else if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/rss+xml") || strings.HasPrefix(contentType, "application/atom+xml") {

View File

@ -15,6 +15,7 @@ type JSONFeedItem struct {
Summary string `json:"summary,omitempty"`
Title string `json:"title,omitempty"`
URL string `json:"url,omitempty"`
Image string `json:"image,omitempty"`
ExternalURL string `json:"external_url,omitempty"`
DatePublished string `json:"date_published,omitempty"`
Tags []string `json:"tags,omitempty"`