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

辅种结束后,一起开始所有辅种后暂停的种子(排除了出错的种子),即使人工确认也是手动开始这部分种子 #513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions plugins/iyuuautoseed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,21 @@ def auto_seed(self):
self.check_recheck()
else:
logger.info(f"没有需要辅种的种子")
#qb 中,辅种结束后,一起开始所有辅种后暂停的种子(排除了出错的种子),及时人工确认也是手动开始这部分种子
for downloader in self._downloaders:
# 只处理 qb
if downloader == "qbittorrent":
downloader_obj = self.__get_downloader(downloader)
paused_torrents, _ = downloader_obj.get_torrents(status=["paused"])
# errored_torrents, _ = downloader_obj.get_torrents(status=["errored"])
pausedUP_torrent_hashs = []
for torrent in paused_torrents:
if 'pausedUP' == torrent.state:
pausedUP_torrent_hashs.append(torrent.hash)
logger.info(f"下载器 {downloader} 自动开始种子 {torrent.name}")
else:
logger.info(f"下载器 {downloader} 不自动开始种子 {torrent.name}, state={torrent.state}")
downloader_obj.start_torrents(ids=pausedUP_torrent_hashs)
# 保存缓存
self.__update_config()
# 发送消息
Expand Down