Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

附件文件名有相同文件文件名时只会下载其中一个 #140

Open
Cbelphgor opened this issue Jul 27, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@Cbelphgor
Copy link

有些作者喜欢一个帖子里用相同的文件名
多线程下载的时候哪个先下载完后一个就会判断已存在而不下载了
导致信息下载不全
用序号命名可以避免这一情况,但是会丢失文件名信息
希望能为添加一个选项设置原文件名前带序号

@Ljzd-PRO
Copy link
Owner

有个方法是设置文件名命名格式,运行目录下创建 prod.env 或写入环境变量:

# 按文件顺序编号重命名
KTOOLBOX_JOB__SEQUENTIAL_FILENAME=True
# 在编号前加上作品标题
KTOOLBOX_JOB__FILENAME_FORMAT={title}_{}

更多可以参考:https://ktoolbox.readthedocs.io/latest/zh/configuration/guide/

@Ljzd-PRO
Copy link
Owner

在原始文件名前加上序号目前还做不到,另外这个是只针对 attachment 的,一般就是图片,但如果是那种压缩包之类的文件也是不行。

@Ljzd-PRO Ljzd-PRO added the enhancement New feature or request label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants