From a319506dda5e63b4aa09dde762750689dfb1520b Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 11 Mar 2022 14:23:05 +1100 Subject: [PATCH] Expose Torrent.AddWebSeeds --- torrent.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/torrent.go b/torrent.go index 1c197f9b..6a24820b 100644 --- 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 -- 2.44.0