Skip to content

qbittorrent_mod

IvonWei edited this page Feb 9, 2022 · 27 revisions

qbittorrent_mod

基础

qbittorrent_mod:
  host: <qbittorrent web path>
  port: 443
  use_ssl: yes
  username: <username>
  password: <password>

添加

    qbittorrent_mod:
      action:
        add:
          category: Rss
          autoTMM: yes
          tracker_options:
            tag_by_tracker: yes
            specific_trackers:
              - tracker_name:
                  upLimit: 13107200
          reject_on:
            bandwidth_limit: 13107200
            dl_speed: 0.6
            dl_limit: 8388608
            remember: yes
可用属性
Property Type Description
savepath string Download folder
cookie string Cookie sent to download the .torrent file
category string Category for the torrent
tags string Tags for the torrent, split by ','
skip_checking string Skip hash checking. Possible values are true, false (default)
paused string Add torrents in the paused state. Possible values are true, false (default)
root_folder string Create the root folder. Possible values are true, false, unset (default)
rename string Rename torrent
upLimit integer Set torrent upload speed limit. Unit in bytes/second
dlLimit integer Set torrent download speed limit. Unit in bytes/second
autoTMM bool Whether Automatic Torrent Management should be used
sequentialDownload string Enable sequential download. Possible values are true, false (default)
firstLastPiecePrio string Prioritize download first last piece. Possible values are true, false (default)
tag_by_tracker boolean 根据tracker添加种子标签, 会与 tags 合并添加
reject_on
Property Type Description
bandwidth_limit integer 网络带宽(最大下载速度)。单位:Byte
dl_speed integer|boolean\float boolean:设为 no 禁用
integer:当下载速度大于设定值时 单位:Byte。
float(取值范围0.1-0.9):使用 带宽 * dl_speed 设定拒绝种子的速度阈值,如 qBittorrent 已经限速,则 带宽 = qBittorrent 限速速度。
dl_limit integer|boolean 当前限速低于设定值时 拒绝新种子(设为 no 禁用) 。(如设定值小于自动限速的最大值,可能会导致 dl_speed 拒绝失效,下例中为 10 GiB / 1800 = 5.69 MiB)单位:Byte
all boolean 拒绝所有种子
remember boolean 记住拒绝过的种子 默认: yes
tracker_options
Property Type Description
tag_by_tracker boolean 根据 tracker 添加 tag
specific_trackers array 对匹配的 tracker_name 覆盖配置,示例例中为 覆盖 upLimit ,其他属性参考 可用属性

删除

    qbittorrent_mod:
      action:
        remove:
          keeper:
            check_reseed:
              - pt1
              - pt2
            delete_files: true
            keep_disk_space: 10
            dl_limit_on_succeeded: 0
            alt_dl_limit_on_succeeded: 8388608
            dl_limit_interval: 1800
          cleaner:
            delete_files: true
keeper 与 cleaner 区别:

keeper模式下 只要成功匹配,无论何时都会删除种子的所有辅种,并根据 delete_files 决定是否删除数据。会接管qBittorrent限速设置

cleaner模式下 只会删除匹配到的种子,就算 delete_files 为真,也只会在种子所有的辅种都满足删除条件时才会删除文件

一个任务只能使用一个模式

keeper可用属性
Property Type Description
check_reseed array|boolean no(默认):所有辅种中只要有一个满足删除条件,就全部删除
yes:所有辅种中只要有其中一个不满足条件则放弃删除
array:只检查匹配tracker的种子,全部满足就全部删除所有辅种
delete_files boolean 删种同时是否删除数据
keep_disk_space integer 磁盘剩余空间阈值,低于阈值才会执行删除 单位:GiB
dl_limit_on_succeeded integer 删除成功(预计剩余磁盘空间 > keep_disk_space )后,设置限速(0为不限速)。单位:Byte
alt_dl_limit_on_succeeded integer 删除成功(预计剩余磁盘空间 > keep_disk_space )后,设置备用限速(0为不限速)。单位:Byte
dl_limit_interval integer 执行删除后 预计剩余磁盘空间 < keep_disk_space,将下载速度限制为 剩余磁盘空间/dl_limit_interval,用于保证时间内不会将磁盘用尽。单位:秒
cleaner可用属性
Property Type Description
delete_files boolean 删种同时是否删除数据

修改

    qbittorrent_mod:
      action:
        modify:
          tag_by_tracker: yes
          replace_trackers:
            'http://tracker.pt1.com/': 'https://tracker.pt1.com/'
可用属性
Property Type Description
tag_by_tracker boolean 提取tracker主域名,为种子添加标签
replace_trackers map 从tracker开始处匹配key,并把匹配到的部分替换为value(value 为 False 时 则删除tracker)

恢复

    qbittorrent_mod:
      action:
        resume:
          recheck_torrents: true
可用属性
Property Type Description
recheck_torrents boolean 如果保存路径上没有种子在正常做种,则重新校验种子,用于检测辅种跳检,将种子还原成0进度状态

连接数管理

基于 当前连接数 + entry['step'] 设置最大连接数,最小不低于 min, 最大不高于 max,也许可以用来防止卡IO

    qbittorrent_mod:
      action:
        manage_conn:
          min: 100
          max: 2000
可用属性
Property Type Description
min integer 最小连接数
max integer 最大连接数

根据tracker状态限速

防白嫖

    qbittorrent_mod:
      action:
        limit_upload_by_tracker:
          working: 0
          not_working: 1
可用属性
Property Type Description
working integer tracker工作时限速,0为不限速 单位byte
not_working integer tracker不工作时限速,0为不限速 单位byte

刷新trakcer状态

    qbittorrent_mod:
      action:
        refresh_tracker: yes
可用属性
Property Type Description
refresh_tracker boolean 刷新trakcer状态,通过修改 tracker 刷新状态

暂停

    qbittorrent_mod:
      action:
        pause: yes
可用属性
Property Type Description
pause boolean 暂停种子