]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Expose Torrent.AddWebSeeds
authorMatt Joiner <anacrolix@gmail.com>
Fri, 11 Mar 2022 03:23:05 +0000 (14:23 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 11 Mar 2022 03:23:05 +0000 (14:23 +1100)
torrent.go

index 1c197f9b66bbf351ac1c010ad24a71e294195316..6a24820bd6e8b3914b680e4e4205a1b77daf7f79 100644 (file)
@@ -2279,6 +2279,14 @@ func (t *Torrent) callbacks() *Callbacks {
        return &t.cl.config.Callbacks
 }
 
+func (t *Torrent) AddWebSeeds(urls []string) {
+       t.cl.lock()
+       defer t.cl.unlock()
+       for _, u := range urls {
+               t.addWebSeed(u)
+       }
+}
+
 func (t *Torrent) addWebSeed(url string) {
        if t.cl.config.DisableWebseeds {
                return