2022.3.13.更新

我已经把flexget移植到了社区,现在,不需要使用custom-app了,但是需要手动添加一下依赖

安装依赖

部署完成后,进入config/custom-cont-init.d,新建一个sh文件,里面写入

#!/usr/bin/with-contenv bash
pip install python-telegram-bot==12.8
pip install chardet
pip install baidu-aip
pip install pillow
pip install pandas
pip install matplotlib
pip install fuzzywuzzy
pip install python-Levenshtein
pip install pyppeteer
pip install pyppeteer_stealth

保存即可

准备

先安装好qb

TrueNAS SCALE 安装TrueCharts社区QBittorrent并修改默认端口

TrueNAS SCALE社区应用设置指定网络接口,真正独立IP,实现bt分流,修复HomeKit

安装flexget

先创建flexget的数据集
image.png

编辑权限
image.png

在flexget数据集里创建两个文件夹configdata

image.png

image.png

使用社区的custom app

image.png

Container Repository:madwind/flexget
Container Tag:latest

image.png

PUID:568
PGID:568
FG_WEBUI_PASSWD:自己设置密码
FG_LOG_LEVEL:INFO

image.png

image.png

image.png

image.png

image.png

image.png

没有截图的地方默认

配置flexget

安装插件

flexget_qbittorrent_mod

  • 下载插件 master
  • 在Flexget的 config 文件夹下新建 plugins 文件夹
  • 将所有的 .py 文件 与 ptsites 文件夹 解压至 plugins 下
  • 重启flexget重新加载配置

nexusphp

nexusphp.py复制到plugins里

配置文件

访问flexget网页
点击config

variables:
  headers:
    user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36'

templates:
  freespace:
    free_space:
      path: /test
      space: 10240 #检查磁盘空间如果只有10G了就停止种子RSS自动化下载
  qb:
    qbittorrent:
      path: /downloads
      host: qb-qbittorrent.ix-qb.svc.cluster.local
      port: 10095
      label: RSS
      username: admin
      password: admin
  qb_mod_base:
    qbittorrent_mod:
      host: qb-qbittorrent.ix-qb.svc.cluster.local
      port: 10095
      use_ssl: no
      username: admin
      password: adminadmin
  qb_mod_add:
    qbittorrent_mod:
      action:
        add:
          category: RSS  
          autoTMM: yes
  qb_mod_remove:
    qbittorrent_mod:
      action:
        remove:
          keeper:
            check_reseed: false
              
            delete_files: yes
            keep_disk_space: 2048
  from_qbittorrent_template:
    from_qbittorrent_mod: &qbittorrent_setting
      host: qb-qbittorrent.ix-qb.svc.cluster.local
      port: 10095
      #非https请设置为 no
      use_ssl: no
      username: admin
      password: adminadmin
            
            


tasks:
  mt:
    rss: 
      url: RSS URL
      other_fields:
        - link
    nexusphp:
      cookie: 'COOKIE'
      user-agent: '{? headers.user_agent ?}'
      comment: yes
      discount:
        - free
      seeders:
        min: 1
    verify_ssl_certificates: no
    content_size:
      min: 10240 # 文件小于 2048M 就不下载
      max: 999900 # 文件大于 9999M 就不下载
      strict: no
    template:
      - qb
      - qb_mod_base
      - qb_mod_add
      - freespace
      
 
  delete:
    priority: 3
    #官方插件:disable 关闭任务记录 失败重试
    disable: [ seen, seen_info_hash, retry_failed, history ]
    #官方插件: if 过滤器
    if:
      #参考entry属性列表
      #种子在 Rss分类 并且 最后活动时间 < 2天 
      - qbittorrent_category in ['RSS'] and qbittorrent_last_activity < now - timedelta(days=2): accept
      
      
    #官方sort_by插件:按最后活动时间从早到晚排序 优先删除
    sort_by: qbittorrent_last_activity
    template:
      - from_qbittorrent_template
      - qb_mod_base
      - qb_mod_remove
          

  
web_server:
  bind: 0.0.0.0
  port: 3539
  web_ui: yes




schedules: 
  - tasks: [delete]
    interval:
      minutes: 30
  - tasks: 'mt'
    interval:
      days: 1

常用命令

点击应用的三个点,命令行
image.png

  • flexget check : 用于检查 config.yml 配置文件是否有格式错误。
  • flexget --test execute : 手动模拟一次 RSS 操作,仅供测试,不会下载种子文件到本地。
  • flexget execute : 手动执行所有任务
  • flexget execute --tasks Series-*: 手动执行指定的任务
  • flexget status : 查看 flexget 的 RSS 记录。
  • flexget execute --learn : 这样子不会下载种子,但是会把这次 RSS 到的种子标记为已下载,这样之后就不会下到老种了

参考:
flexget-nexusphp
flexget
如何优雅地刷 PT
flexget_qbittorrent_mod

最后修改:2022 年 06 月 02 日
感谢您的支持