From e6622b123d1ffd52f6c83b1d65eabe18c732d124 Mon Sep 17 00:00:00 2001 From: itouakirai <85016486+itouakirai@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E8=BF=9B=E5=BA=A6=E6=9D=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA=EF=BC=8C=E9=80=82=E9=85=8D?= =?UTF-8?q?=E7=AA=84=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 1309c80..90b8e71 100644 --- a/main.go +++ b/main.go @@ -978,15 +978,16 @@ func decryptSong(info *SongInfo, keys []string, manifest *AutoGenerated, filenam defer conn.Close() var decrypted []byte var lastIndex uint32 = math.MaxUint8 - + fmt.Println("Decrypting...") bar := progressbar.NewOptions64(info.totalDataSize, progressbar.OptionClearOnFinish(), - progressbar.OptionSetElapsedTime(true), + progressbar.OptionSetElapsedTime(false), + progressbar.OptionSetPredictTime(false), progressbar.OptionShowElapsedTimeOnFinish(), progressbar.OptionShowCount(), progressbar.OptionEnableColorCodes(true), progressbar.OptionShowBytes(true), - progressbar.OptionSetDescription("Decrypting..."), + //progressbar.OptionSetDescription("Decrypting..."), progressbar.OptionSetTheme(progressbar.Theme{ Saucer: "", SaucerHead: "", @@ -2331,6 +2332,7 @@ func extractVideo(c string) (string, error) { return streamUrl.String(), nil } func extractSong(url string) (*SongInfo, error) { + fmt.Println("Downloading...") track, err := http.Get(url) if err != nil { return nil, err @@ -2342,12 +2344,13 @@ func extractSong(url string) (*SongInfo, error) { contentLength := track.ContentLength bar := progressbar.NewOptions64(contentLength, progressbar.OptionClearOnFinish(), - progressbar.OptionSetElapsedTime(true), + progressbar.OptionSetElapsedTime(false), + progressbar.OptionSetPredictTime(false), progressbar.OptionShowElapsedTimeOnFinish(), progressbar.OptionShowCount(), progressbar.OptionEnableColorCodes(true), progressbar.OptionShowBytes(true), - progressbar.OptionSetDescription("Downloading..."), + //progressbar.OptionSetDescription("Downloading..."), progressbar.OptionSetTheme(progressbar.Theme{ Saucer: "", SaucerHead: "",