fix 插件API安全控制

This commit is contained in:
jxxghp
2024-04-25 18:00:31 +08:00
parent 827007fe24
commit b367d1a4f6
25 changed files with 219 additions and 183 deletions

View File

@@ -99,7 +99,6 @@ class TrackerEditor(_PluginBase):
for torrent in torrent_list:
new_tracker_list = []
for tracker in torrent.tracker_list:
new_url = None
if self._target_domain in tracker:
new_url = tracker.replace(self._target_domain, self._replace_domain)
new_tracker_list.append(new_url)
@@ -114,7 +113,7 @@ class TrackerEditor(_PluginBase):
__tracker_list = new_tracker_list
if torrent_update_cnt > 0:
update_result = self._downloader.update_tracker(hash_string=torrent.hashString, tracker_list=__tracker_list)
if update_result == False:
if not update_result:
logger.error(f"执行tracker修改出错中止本次执行")
torrent_update_cnt = 0
break