Reload server and edit configuration. (#15)
The first iteration for config editor and server reload from the web interface.
This commit is contained in:
parent
56d32fd1f4
commit
0e2288565d
53 changed files with 882 additions and 178 deletions
torrent
19
torrent/client.go
Normal file
19
torrent/client.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package torrent
|
||||
|
||||
import (
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
)
|
||||
|
||||
func NewClient(st storage.ClientImpl) (*torrent.Client, error) {
|
||||
// TODO download and upload limits
|
||||
torrentCfg := torrent.NewDefaultClientConfig()
|
||||
torrentCfg.Logger = log.Discard
|
||||
torrentCfg.Seed = true
|
||||
torrentCfg.DisableTCP = true
|
||||
torrentCfg.DefaultStorage = st
|
||||
|
||||
return torrent.NewClient(torrentCfg)
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue