Skip to content

Commit 1711a26

Browse files
committed
Download progress now prints 'already downloaded' when appropriate
1 parent afe0a4f commit 1711a26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

output/rpc_progress.go

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ func DownloadProgressBar() func(*rpc.DownloadProgress) {
3232
return func(curr *rpc.DownloadProgress) {
3333
// fmt.Printf(">>> %v\n", curr)
3434
if filename := curr.GetFile(); filename != "" {
35+
if curr.GetCompleted() {
36+
fmt.Println(filename + " already downloaded")
37+
return
38+
}
3539
prefix = filename
3640
bar = pb.StartNew(int(curr.GetTotalSize()))
3741
bar.Prefix(prefix)

0 commit comments

Comments
 (0)