minor updates

This commit is contained in:
Qiu Jian
2019-01-17 00:08:57 +08:00
parent d3da407cd0
commit daba249249
+5 -12
View File
@@ -146,26 +146,19 @@ func main() {
log.Fatalf("%s", err)
}
go func() {
<-t.GotInfo()
<-t.GotInfo()
t.DownloadAll()
files := t.Info().Files
log.Debugf("Got Info, start download %d files", len(files))
for i := 0; i < len(files); i += 1 {
log.Debugf("%d: %s", i, files[i].Path)
}
t.DownloadAll()
}()
stop := false
go func() {
<-client.Closed()
log.Debugf("client closed, exit!")
os.Exit(0)
stop = true
}()
for {
for !stop {
if t.BytesCompleted() == t.Info().TotalLength() {
fmt.Printf("\rSeeding.............")
if len(options.CallbackURL) > 0 {