izone Posted May 28 Share Posted May 28 TRaSH Guides unRAID Mover and qBittorrent 网上搜到的唯一方法,还没验证成功与否, 让GPT给修改了一下。 有大佬给看下吗? 是否能做到在脚本执行的时候 暂停qb 然后运行mover 然后move完毕 重启QB? #!/bin/bash # 定义一个通知函数,用于发送通知消息 notify() { # 使用dynamix脚本发送通知消息,传递的参数是通知的主体和描述 /usr/local/emhttp/plugins/dynamix/scripts/notify -s "qBittorrent Mover" -d "$1 @ $(date +%H:%M:%S)." } # 发送开始通知,指示qBittorrent Mover开始运行 notify "qBittorrent Mover starting" # 输出到控制台,指示正在执行脚本以暂停种子并运行mover echo "Executing script to pause torrents and run mover." # 运行Python脚本并捕获其返回码 # --host: 指定qBittorrent的主机地址 # --user: 指定qBittorrent的用户名 # --password: 指定qBittorrent的密码 # --cache-mount: 指定缓存挂载点 # --days_from: 指定起始天数 # --days_to: 指定结束天数 if python3 /mnt/user/theme/mover.py --host "10.0.0.4:8080" --user "qbb" --password "password" --cache-mount "/mnt/cache" --days_from 0 --days_to 2; then # 如果Python脚本成功执行 echo "qbittorrent-mover completed successfully and resumed all paused torrents." # 发送完成通知,指示qBittorrent Mover成功完成 notify "qBittorrent Mover completed" else # 如果Python脚本执行失败 echo "qbittorrent-mover encountered an error." # 发送错误通知,指示qBittorrent Mover遇到错误 notify "qBittorrent Mover encountered an error" fi Quote Link to comment
JackieWu Posted May 29 Share Posted May 29 16 hours ago, izone said: TRaSH Guides unRAID Mover and qBittorrent 网上搜到的唯一方法,还没验证成功与否, 让GPT给修改了一下。 有大佬给看下吗? 是否能做到在脚本执行的时候 暂停qb 然后运行mover 然后move完毕 重启QB? #!/bin/bash # 定义一个通知函数,用于发送通知消息 notify() { # 使用dynamix脚本发送通知消息,传递的参数是通知的主体和描述 /usr/local/emhttp/plugins/dynamix/scripts/notify -s "qBittorrent Mover" -d "$1 @ $(date +%H:%M:%S)." } # 发送开始通知,指示qBittorrent Mover开始运行 notify "qBittorrent Mover starting" # 输出到控制台,指示正在执行脚本以暂停种子并运行mover echo "Executing script to pause torrents and run mover." # 运行Python脚本并捕获其返回码 # --host: 指定qBittorrent的主机地址 # --user: 指定qBittorrent的用户名 # --password: 指定qBittorrent的密码 # --cache-mount: 指定缓存挂载点 # --days_from: 指定起始天数 # --days_to: 指定结束天数 if python3 /mnt/user/theme/mover.py --host "10.0.0.4:8080" --user "qbb" --password "password" --cache-mount "/mnt/cache" --days_from 0 --days_to 2; then # 如果Python脚本成功执行 echo "qbittorrent-mover completed successfully and resumed all paused torrents." # 发送完成通知,指示qBittorrent Mover成功完成 notify "qBittorrent Mover completed" else # 如果Python脚本执行失败 echo "qbittorrent-mover encountered an error." # 发送错误通知,指示qBittorrent Mover遇到错误 notify "qBittorrent Mover encountered an error" fi 这个脚本自身会自动暂停 QB 里面的任务来配合 Mover,不需要停止 QB docker 容器。你试一下看看能不能用就行,我之前接触到,但是后面没有用过了。 Quote Link to comment
izone Posted June 5 Author Share Posted June 5 (edited) On 5/29/2024 at 10:26 PM, JackieWu said: 这个脚本自身会自动暂停 QB 里面的任务来配合 Mover,不需要停止 QB docker 容器。你试一下看看能不能用就行,我之前接触到,但是后面没有用过了。 我在插件里第一个开NO 是不是等于关闭系统的那个mover功能啊? 我今天仔细看了下 我用上面的那个命令执行的 今天是没有需要移动的项目,但是 依然能移动了很久,而且会造成tr 假死失联。 我的命令设置的是 每天18 30执行。 然后系统自带的mover之前也是设置的 每天18.30执行。 发现这个情况后我到处找禁用系统的这个mover没找到,现在把他改成一个月执行一次了。 而且我发现在mover的时候qb的项目并没有显示暂停。 依然是上传做种的状态,但是在那个命令的log里 显示执行了暂停操作。 不知道这个是什么情况。 Edited June 5 by izone Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.