Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
fix: rss parse magnet
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Jul 15, 2021
1 parent a371871 commit c02f2c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/server_rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@ func (s *Server) serveRSS(w http.ResponseWriter, r *http.Request) {
} else {
// some sites put it under enclosures
for _, e := range i.Enclosures {
if e.Type == "application/x-bittorrent" {
ritem.Torrent = e.URL
continue
}
if strings.HasPrefix(e.URL, "magnet:") {
ritem.Magnet = e.URL
} else if e.Type == "application/x-bittorrent" {
ritem.Torrent = e.URL
}
}

Expand Down

0 comments on commit c02f2c3

Please sign in to comment.