Skip to content

下载配置

通过 config.yaml 控制下载行为。

视频号专属的下载行为,请参考视频号配置

下载时的文件名称

yaml
download:
  filenameTemplate: "{{filename}}_{{spec}}"

下载时的文件名称,默认「文件名_视频质量」。.mp4 后缀由下载器添加,不支持手动设置后缀

目前支持如下变量

js
type params = {
  /** 默认文件名,优先取 title,没有则取视频 id,仍没有则使用 当前时间秒数 */
  filename: string,
  /** 视频 id */
  id: string,
  /** 视频标题 */
  title: string,
  /** 视频质量 original | 'xWT111' */
  spec: string,
  /** 视频发布时间(单位秒) */
  created_at: number,
  /** 视频下载时间(单位秒) */
  download_at: number,
  /** up主名称 */
  author: string,
};

如果存在 / 符号,例如 {{author}}/{{filename}}_{{spec}},这样下载的文件会放在以作者名为目录的目录中,该能力仅在后台下载时生效

下载目录

yaml
download:
  dir: "%UserDownloads%"

下载文件存放的目录,默认为用户下载目录。可以修改为任意「绝对路径目录」。仅在后台下载时生效

完成音效

yaml
download:
  playDoneAudio: true

后台下载模式下,下载完成后是否播放完成音效,默认 true

最大并发任务数

yaml
download:
  maxRunning: 3

同时运行的下载任务数量上限,默认 3

Default action when a task exists

yaml
download:
  defaultActionWhenExisting: ""

When creating a download task, an existing task normally returns a conflict so the caller can choose an action. Set this to skip, duplicate, or overwrite to skip the incoming task, create another copy, or overwrite the existing task.

远程服务

yaml
download:
  remoteServer:
    enabled: false
    protocol: "http"
    hostname: "192.168.1.118"
    port: 2022

是否启用远程服务下载,默认 false