Expose Torrent.AddWebSeeds

This commit is contained in:
Matt Joiner 2022-03-11 14:23:05 +11:00
parent ec2b1b2073
commit a319506dda
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
1 changed files with 8 additions and 0 deletions

View 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