projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec2b1b2
)
Expose Torrent.AddWebSeeds
author
Matt Joiner <anacrolix@gmail.com>
Fri, 11 Mar 2022 03:23:05 +0000 (14:23 +1100)
committer
Matt Joiner <anacrolix@gmail.com>
Fri, 11 Mar 2022 03:23:05 +0000 (14:23 +1100)
torrent.go
patch
|
blob
|
history
diff --git
a/torrent.go
b/torrent.go
index 1c197f9b66bbf351ac1c010ad24a71e294195316..6a24820bd6e8b3914b680e4e4205a1b77daf7f79 100644
(file)
--- a/
torrent.go
+++ b/
torrent.go
@@
-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