Skip to content

Commit

Permalink
Keep rendering upload speed even if we are finished downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Sioro-Neoku committed Jul 7, 2016
1 parent 3cd7e91 commit 86f3350
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,15 @@ func (c *Client) Render() {
if c.ReadyForPlayback() {
fmt.Printf("Stream: \thttp://localhost:%d\n", c.Port)
}

if currentProgress > 0 {
fmt.Printf("Progress: \t%s / %s %.2f%%\n", complete, size, c.percentage())
}
if currentProgress < t.Info().TotalLength() {
fmt.Printf("Download speed: %s\n", downloadSpeed)
if c.Seed {
fmt.Printf("Upload speed: \t%s\n", uploadSpeed)
}
}

if c.Seed {
fmt.Printf("Upload speed: \t%s\n", uploadSpeed)
}
}

func (c Client) getLargestFile() *torrent.File {
Expand Down

0 comments on commit 86f3350

Please sign in to comment.