diff --git a/controllers/rss_handler.go b/controllers/rss_handler.go index 5a7dbd1d..7cb95ff8 100644 --- a/controllers/rss_handler.go +++ b/controllers/rss_handler.go @@ -87,7 +87,7 @@ func RSSMagnetHandler(c *gin.Context) { torrentJSON := torrent.ToJSON() feed.Items[i] = &nyaafeeds.RssItem{ Title: torrentJSON.Name, - MagnetLink: &nyaafeeds.RssMagnetLink{Text: string(torrentJSON.Magnet)}, + Link: &nyaafeeds.RssMagnetLink{Text: string(torrentJSON.Magnet)}, Description: string(torrentJSON.Description), PubDate: torrent.Date.Format(time.RFC822), GUID: config.WebAddress() + "/view/" + strconv.FormatUint(uint64(torrentJSON.ID), 10), diff --git a/utils/feeds/rss.go b/utils/feeds/rss.go index 4c8acd32..1fdbb2f8 100644 --- a/utils/feeds/rss.go +++ b/utils/feeds/rss.go @@ -71,14 +71,13 @@ type RssFeed struct { } type RssItem struct { - XMLName xml.Name `xml:"item"` - Title string `xml:"title"` // required - Link string `xml:"link,omitempty"` - MagnetLink *RssMagnetLink `xml:"link,omitempty"` - Description string `xml:"description"` // required - Author string `xml:"author,omitempty"` - Category *RssCategory `xml:"category,omitempty"` - Comments string `xml:"comments,omitempty"` + XMLName xml.Name `xml:"item"` + Title string `xml:"title"` // required + Link interface{} `xml:"link,omitempty"` + Description string `xml:"description"` // required + Author string `xml:"author,omitempty"` + Category *RssCategory `xml:"category,omitempty"` + Comments string `xml:"comments,omitempty"` Enclosure *RssEnclosure GUID string `xml:"guid,omitempty"` // Id used PubDate string `xml:"pubDate,omitempty"` // created or updated