Fix dates in RSS feed
Cette révision appartient à :
Parent
a96902a737
révision
b6b2d836c0
1 fichiers modifiés avec 6 ajouts et 8 suppressions
|
@ -26,19 +26,17 @@ func RSSHandler(w http.ResponseWriter, r *http.Request) {
|
|||
Link: &feeds.Link{Href: "https://" + config.WebAddress + "/"},
|
||||
Created: createdAsTime,
|
||||
}
|
||||
feed.Items = []*feeds.Item{}
|
||||
feed.Items = make([]*feeds.Item, len(torrents))
|
||||
|
||||
for i := range torrents {
|
||||
torrentJSON := torrents[i].ToJSON()
|
||||
for i, torrent := range torrents {
|
||||
torrentJSON := torrent.ToJSON()
|
||||
feed.Items[i] = &feeds.Item{
|
||||
// need a torrent view first
|
||||
Id: "https://" + config.WebAddress + "/view/" + strconv.FormatUint(uint64(torrents[i].ID), 10),
|
||||
Title: torrents[i].Name,
|
||||
Title: torrent.Name,
|
||||
Link: &feeds.Link{Href: string(torrentJSON.Magnet)},
|
||||
Description: string(torrentJSON.Description),
|
||||
Created: torrents[0].Date,
|
||||
Updated: torrents[0].Date,
|
||||
Created: torrent.Date,
|
||||
Updated: torrent.Date,
|
||||
}
|
||||
}
|
||||
// allow cross domain AJAX requests
|
||||
|
|
Référencer dans un nouveau ticket