type ForHTTP struct {
Hashes map[string][]byte
URLs []string
+ Torrents []string
}
func Parse(fn string, data []byte) (*ForHTTP, error) {
for _, u := range f.URLs {
forHTTP.URLs = append(forHTTP.URLs, u.URL)
}
+ for _, m := range f.MetaURLs {
+ if m.MediaType == "torrent" {
+ forHTTP.Torrents = append(forHTTP.Torrents, m.URL)
+ }
+ }
return &forHTTP, nil
}
return nil, nil