]> Sergey Matveev's repositories - btrtrc.git/blob - tests/issue-798/main.go
gorond
[btrtrc.git] / tests / issue-798 / main.go
1 package main
2
3 import (
4         "fmt"
5
6         "github.com/anacrolix/torrent"
7 )
8
9 func main() {
10         config := torrent.NewDefaultClientConfig()
11         config.DataDir = "./output"
12         c, _ := torrent.NewClient(config)
13         defer c.Close()
14         t, _ := c.AddMagnet("magnet:?xt=urn:btih:99c82bb73505a3c0b453f9fa0e881d6e5a32a0c1&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce")
15         <-t.GotInfo()
16         fmt.Println("start downloading")
17         t.DownloadAll()
18         c.WaitAll()
19 }