Merge pull request #621 from so1ve/patch-2

fix: 为更多做种相关插件提供 qbittorrent 5 支持
This commit is contained in:
jxxghp
2024-12-29 17:33:27 +08:00
committed by GitHub
5 changed files with 5 additions and 5 deletions

View File

@@ -1018,7 +1018,7 @@ class IYUUAutoSeed(_PluginBase):
判断种子是否可以做种并处于暂停状态
"""
try:
return torrent.get("state") == "pausedUP" if dl_type == "qbittorrent" \
return torrent.get("state") == "pausedUP" or torrent.get("state") == "stoppedUP" if dl_type == "qbittorrent" \
else (torrent.status.stopped and torrent.percent_done == 1)
except Exception as e:
print(str(e))

View File

@@ -678,7 +678,7 @@ class QbCommand(_PluginBase):
torrents = []
for torrent in all_torrents:
if torrent.get("state") == "pausedUP":
if torrent.get("state") == "pausedUP" or torrent.get("state") == "stoppedUP":
tracker_url = self.get_torrent_tracker(torrent)
if not tracker_url:
logger.info(f"获取种子 {torrent.name} Tracker失败不过滤该种子")

View File

@@ -1164,7 +1164,7 @@ class CrossSeed(_PluginBase):
判断种子是否可以做种并处于暂停状态
"""
try:
return torrent.get("state") == "pausedUP" if dl_type == "qbittorrent" \
return torrent.get("state") == "pausedUP" or torrent.get("state") == "stoppedUP" if dl_type == "qbittorrent" \
else (torrent.status.stopped and torrent.percent_done == 1)
except Exception as e:
print(str(e))

View File

@@ -1006,7 +1006,7 @@ class IYUUAutoSeed(_PluginBase):
判断种子是否可以做种并处于暂停状态
"""
try:
return torrent.get("state") == "pausedUP" if dl_type == "qbittorrent" \
return torrent.get("state") == "pausedUP" or torrent.get("state") == "stoppedUP" if dl_type == "qbittorrent" \
else (torrent.status.stopped and torrent.percent_done == 1)
except Exception as e:
print(str(e))

View File

@@ -622,7 +622,7 @@ class QbCommand(_PluginBase):
torrents = []
for torrent in all_torrents:
if torrent.get("state") == "pausedUP":
if torrent.get("state") == "pausedUP" or torrent.get("state") == "stoppedUP":
tracker_url = self.get_torrent_tracker(torrent)
if not tracker_url:
logger.info(f"获取种子 {torrent.name} Tracker失败不过滤该种子")