From accd7fe1660c4ff8e5ed8168ea0d46510af5f622 Mon Sep 17 00:00:00 2001 From: Akhil Gupta Date: Wed, 28 Jul 2021 16:18:37 +0530 Subject: [PATCH] better rss feeds --- controllers/podcast.go | 2 ++ model/rssModels.go | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/controllers/podcast.go b/controllers/podcast.go index 04713d6..471a15d 100644 --- a/controllers/podcast.go +++ b/controllers/podcast.go @@ -442,7 +442,9 @@ func createRss(items []db.PodcastItem, title, description string, c *gin.Context Title: title, Description: description, Summary: description, + Author: "Podgrab Aggregation", Link: fmt.Sprintf("%s://%s/allTags", url.Scheme, url.Host), + Image: model.RssItemImage{Text: title, Href: fmt.Sprintf("%s://%s/webassets/blank.png", url.Scheme, url.Host)}, }, } } diff --git a/model/rssModels.go b/model/rssModels.go index 3796b50..6afda25 100644 --- a/model/rssModels.go +++ b/model/rssModels.go @@ -18,14 +18,16 @@ type RssPodcastData struct { Channel RssChannel `xml:"channel"` } type RssChannel struct { - Text string `xml:",chardata"` - Language string `xml:"language"` - Link string `xml:"link"` - Title string `xml:"title"` - Description string `xml:"description"` - Type string `xml:"type"` - Summary string `xml:"summary"` - Item []RssItem `xml:"item"` + Text string `xml:",chardata"` + Language string `xml:"language"` + Link string `xml:"link"` + Title string `xml:"title"` + Description string `xml:"description"` + Type string `xml:"type"` + Summary string `xml:"summary"` + Image RssItemImage `xml:"image"` + Item []RssItem `xml:"item"` + Author string `xml:"author"` } type RssItem struct { Text string `xml:",chardata"`