fix(app): higher default value of part size

This commit is contained in:
iyear 2024-10-23 21:26:09 +08:00
parent 8779cbfe92
commit 102be9e55f
5 changed files with 11 additions and 9 deletions

View File

@ -122,7 +122,9 @@ func New() *cobra.Command {
cmd.PersistentFlags().StringP(consts.FlagNamespace, "n", "default", "namespace for Telegram session")
cmd.PersistentFlags().Bool(consts.FlagDebug, false, "enable debug mode")
cmd.PersistentFlags().IntP(consts.FlagPartSize, "s", 512*1024, "part size for transfer, max is 512*1024")
cmd.PersistentFlags().IntP(consts.FlagPartSize, "s", 1024*1024, "part size for transfer, max is 1024*1024 bytes")
_ = cmd.PersistentFlags().MarkDeprecated(consts.FlagPartSize, "--size(-s) flag has been set to 1MiB(MAX) by default, and will be removed in the future")
cmd.PersistentFlags().IntP(consts.FlagThreads, "t", 4, "max threads for transfer one item")
cmd.PersistentFlags().IntP(consts.FlagLimit, "l", 2, "max number of concurrent tasks")
cmd.PersistentFlags().Int(consts.FlagPoolSize, 8, "specify the size of the DC pool, zero means infinity")

View File

@ -60,10 +60,10 @@ tdl dl -u https://t.me/tdl/1 -d /path/to/dir
## Custom Parameters:
Download with 8 threads per task, 512KiB(MAX) part size, 4 concurrent tasks:
Download with 8 threads per task, 4 concurrent tasks:
{{< command >}}
tdl dl -u https://t.me/tdl/1 -t 8 -s 524288 -l 4
tdl dl -u https://t.me/tdl/1 -t 8 -l 4
{{< /command >}}
## Descending Order:

View File

@ -25,10 +25,10 @@ tdl up -p /path/to/file -c CHAT
## Custom Parameters
Upload with 8 threads per task, 512KiB(MAX) part size, 4 concurrent tasks:
Upload with 8 threads per task, 4 concurrent tasks:
{{< command >}}
tdl up -p /path/to/file -t 8 -s 524288 -l 4
tdl up -p /path/to/file -t 8 -l 4
{{< /command >}}
## Filter

View File

@ -57,10 +57,10 @@ tdl dl -u https://t.me/tdl/1 -d /path/to/dir
## 自定义参数:
使用每个任务8个线程512KiB最大的分块大小4个并发任务下载
使用每个任务8个线程4个并发任务下载
{{< command >}}
tdl dl -u https://t.me/tdl/1 -t 8 -s 524288 -l 4
tdl dl -u https://t.me/tdl/1 -t 8 -l 4
{{< /command >}}
## 反序下载:

View File

@ -25,10 +25,10 @@ tdl up -p /path/to/file -c CHAT
## 自定义参数
使用每个任务8个线程、512KiB最大分块大小、4个并发任务上传
使用每个任务8个线程、4个并发任务上传
{{< command >}}
tdl up -p /path/to/file -t 8 -s 524288 -l 4
tdl up -p /path/to/file -t 8 -l 4
{{< /command >}}
## 过滤器