func bytesCompleted(tc *torrent.Client) (ret int64) {
for _, t := range tc.Torrents() {
- if t.Info != nil {
+ if t.Info() != nil {
ret += t.BytesCompleted()
}
}
log.SetFlags(log.LstdFlags | log.Lshortfile)
var rootGroup struct {
Client torrent.Config `group:"Client Options"`
- Seed bool `long:"seed" description:"continue seeding torrents after completed"`
TestPeers []string `long:"test-peer" description:"address of peer to inject to every torrent"`
Pick string `long:"pick" description:"filename to pick"`
}
os.Stdout.WriteString(progressLine(client))
}
}
- if rootGroup.Seed {
+ if rootGroup.Client.Seed {
select {}
}
}