mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 23:16:47 +00:00
Merge pull request #621 from so1ve/patch-2
fix: 为更多做种相关插件提供 qbittorrent 5 支持
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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失败,不过滤该种子")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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失败,不过滤该种子")
|
||||
|
||||
Reference in New Issue
Block a user