mirror of
https://gitee.com/zhangsken/aliyunpan.git
synced 2026-10-16 02:23:49 +08:00
delete useless code
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user