fix rss
Cette révision appartient à :
Parent
39e4b6df36
révision
2204207dd9
2 fichiers modifiés avec 9 ajouts et 10 suppressions
|
@ -91,12 +91,12 @@ func RSSMagnetHandler(w http.ResponseWriter, r *http.Request) {
|
|||
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),
|
||||
Enclosure: &nyaafeeds.RssEnclosure{
|
||||
URL: config.WebAddress() + "/download/" + strings.TrimSpace(torrentJSON.Hash),
|
||||
URL: config.WebAddress() + "/download/" + strings.TrimSpace(torrentJSON.Hash),
|
||||
Length: strconv.FormatUint(uint64(torrentJSON.Filesize), 10),
|
||||
Type: "application/x-bittorrent",
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
Référencer dans un nouveau ticket