diff --git a/app/modules/qbittorrent/qbittorrent.py b/app/modules/qbittorrent/qbittorrent.py index 54746ba5..b4f69c4e 100644 --- a/app/modules/qbittorrent/qbittorrent.py +++ b/app/modules/qbittorrent/qbittorrent.py @@ -16,7 +16,7 @@ class Qbittorrent(metaclass=Singleton): _host: str = None _port: int = None _username: str = None - _passowrd: str = None + _password: str = None qbc: Client = None diff --git a/app/modules/transmission/transmission.py b/app/modules/transmission/transmission.py index 4824df33..34511f10 100644 --- a/app/modules/transmission/transmission.py +++ b/app/modules/transmission/transmission.py @@ -14,7 +14,7 @@ class Transmission(metaclass=Singleton): _host: str = None _port: int = None _username: str = None - _passowrd: str = None + _password: str = None trc: Optional[Client] = None @@ -355,3 +355,15 @@ class Transmission(metaclass=Singleton): except Exception as err: logger.error(f"设置种子出错:{str(err)}") return False + + def update_tracker(self, hash_string, tracker_list: List = None): + """ + tr4.0及以上弃用直接设置tracker 共用change方法 + https://github.com/trim21/transmission-rpc/blob/8eb82629492a0eeb0bb565f82c872bf9ccdcb313/transmission_rpc/client.py#L654 + """ + try: + self.trc.change_torrent(ids=hash_string, + tracker_list=tracker_list) + except Exception as err: + logger.error(f"修改tracker出错:{str(err)}") + return False