From 7c652b22a1035da10338996e95875effe4f1a1c8 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 17 Jun 2021 19:43:30 +0200 Subject: [PATCH] better output --- sources/youtubeVideo.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sources/youtubeVideo.go b/sources/youtubeVideo.go index 930adef..2bf95c4 100644 --- a/sources/youtubeVideo.go +++ b/sources/youtubeVideo.go @@ -395,7 +395,12 @@ func (v *YoutubeVideo) download() error { decor.EwmaETA(decor.ET_STYLE_GO, 90), decor.Name(" ] "), decor.EwmaSpeed(decor.UnitKiB, "% .2f ", 60), + decor.OnComplete( + // ETA decorator with ewma age of 60 + decor.EwmaETA(decor.ET_STYLE_GO, 60), "done", + ), ), + mpb.BarRemoveOnComplete(), ) for { @@ -737,7 +742,7 @@ func (v *YoutubeVideo) downloadAndPublish(daemon *jsonrpc.Client, params SyncPar break } - log.Debugln("Downloaded " + v.id) + //log.Debugln("Downloaded " + v.id) ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) defer cancelFn()