Merge pull request #58 from thsrite/main

fix TR连接、删种插件state报错
This commit is contained in:
jxxghp 2023-08-11 07:21:56 +08:00 committed by GitHub
commit f1ef102a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class Transmission(metaclass=Singleton):
"error", "errorString", "doneDate", "queuePosition", "activityDate", "trackers"]
def __init__(self):
self._host, self._port = StringUtils.get_domain_address(settings.QB_HOST)
self._host, self._port = StringUtils.get_domain_address(settings.TR_HOST)
self._username = settings.TR_USER
self._password = settings.TR_PASSWORD
if self._host and self._port and self._username and self._password:

View File

@ -132,7 +132,7 @@ class TorrentRemover(_PluginBase):
})
def get_state(self) -> bool:
return self._enabled and self._cron and self._downloaders
return self._enabled and True if self._cron and self._downloaders else False
@staticmethod
def get_command() -> List[Dict[str, Any]]: