Merge pull request #32 from itouakirai/main

减少进度条信息显示,适配窄窗口
pull/35/head
ZHAAREY 2 months ago committed by GitHub
commit d19e9ba0ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      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: "",

Loading…
Cancel
Save