diff --git a/internal/command/album.go b/internal/command/album.go index 2eb71f4..98fa248 100644 --- a/internal/command/album.go +++ b/internal/command/album.go @@ -392,7 +392,6 @@ func RunShareAlbumDownloadFile(albumNames []string, options *DownloadOptions) { Cfg: &newCfg, // 复制一份新的cfg PanClient: panClient, VerbosePrinter: panCommandVerbose, - PrintFormat: downloadPrintFormat(options.Load), ParentTaskExecutor: &executor, DownloadStatistic: statistic, IsPrintStatus: options.IsPrintStatus, diff --git a/internal/command/album_web.go b/internal/command/album_web.go index 81c4e15..723c201 100644 --- a/internal/command/album_web.go +++ b/internal/command/album_web.go @@ -735,7 +735,6 @@ func RunAlbumDownloadFile(albumNames []string, options *DownloadOptions) { Cfg: &newCfg, // 复制一份新的cfg PanClient: panClient, VerbosePrinter: panCommandVerbose, - PrintFormat: downloadPrintFormat(options.Load), ParentTaskExecutor: &executor, DownloadStatistic: statistic, IsPrintStatus: options.IsPrintStatus, diff --git a/internal/command/download.go b/internal/command/download.go index 5098d9e..d7cc052 100644 --- a/internal/command/download.go +++ b/internal/command/download.go @@ -222,13 +222,6 @@ func CmdDownload() cli.Command { } } -func downloadPrintFormat(load int) string { - if load <= 1 { - return pandownload.DefaultPrintFormat - } - return "\r[%s] ↓ %s/%s %s/s in %s, left %s ..." -} - // RunDownload 执行下载网盘内文件 func RunDownload(paths []string, options *DownloadOptions) { activeUser := GetActiveUser() @@ -432,7 +425,6 @@ func RunDownload(paths []string, options *DownloadOptions) { PanClient: panClient, SubPanClientList: subPanClientList, VerbosePrinter: panCommandVerbose, - PrintFormat: downloadPrintFormat(options.Load), ParentTaskExecutor: &executor, DownloadStatistic: statistic, IsPrintStatus: options.IsPrintStatus, diff --git a/internal/functions/pandownload/download_task_unit.go b/internal/functions/pandownload/download_task_unit.go index ba9138f..95e11c1 100644 --- a/internal/functions/pandownload/download_task_unit.go +++ b/internal/functions/pandownload/download_task_unit.go @@ -59,7 +59,6 @@ type ( // 可选项 VerbosePrinter *logger.CmdVerbose - PrintFormat string IsPrintStatus bool // 是否输出各个下载线程的详细信息 IsExecutedPermission bool // 下载成功后是否加上执行权限 IsOverwrite bool // 是否覆盖已存在的文件 @@ -204,11 +203,6 @@ func (dtu *DownloadTaskUnit) download() (err error) { return apierror.NewFailedApiError("") }) - // 检查输出格式 - if dtu.PrintFormat == "" { - dtu.PrintFormat = DefaultPrintFormat - } - // 这里用共享变量的方式 isComplete := false der.OnDownloadStatusEvent(func(status transfer.DownloadStatuser, workersCallback func(downloader.RangeWorkerFunc)) {