]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Include webseed URLs in output of Torrent.Metainfo
authorMatt Joiner <anacrolix@gmail.com>
Thu, 18 Feb 2021 03:37:06 +0000 (14:37 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 18 Feb 2021 03:37:06 +0000 (14:37 +1100)
torrent.go

index a4ae4b48c4bb340a310edefa1a67a304038e34e6..b30da881e6d8cf0add1d2d469b2d71c04a57b98a 100644 (file)
@@ -674,6 +674,13 @@ func (t *Torrent) newMetaInfo() metainfo.MetaInfo {
                                return nil
                        }
                }(),
+               UrlList: func() []string {
+                       ret := make([]string, 0, len(t.webSeeds))
+                       for url := range t.webSeeds {
+                               ret = append(ret, url)
+                       }
+                       return ret
+               }(),
        }
 }