This commit is contained in:
jeblove
2024-03-11 16:17:36 +08:00
6 changed files with 16 additions and 11 deletions

View File

@ -32,8 +32,8 @@ class QbittorrentModule(_ModuleBase):
"""
if self.qbittorrent.is_inactive():
self.qbittorrent.reconnect()
if self.qbittorrent.is_inactive():
return False, "无法连接Qbittorrent请检查参数配置"
if not self.qbittorrent.transfer_info():
return False, "无法获取Qbittorrent状态,请检查参数配置"
return True, ""
def init_setting(self) -> Tuple[str, Union[str, bool]]:

View File

@ -107,7 +107,7 @@ class CategoryHelper(metaclass=Singleton):
:return: 二级分类的名称
"""
genre_ids = tmdb_info.get("genre_ids") or []
if genre_ids \
if self._anime_categorys and genre_ids \
and set(genre_ids).intersection(set(settings.ANIME_GENREIDS)):
return self.get_category(self._anime_categorys, tmdb_info)
return self.get_category(self._tv_categorys, tmdb_info)

View File

@ -32,8 +32,8 @@ class TransmissionModule(_ModuleBase):
"""
if self.transmission.is_inactive():
self.transmission.reconnect()
if self.transmission.is_inactive():
return False, "无法连接Transmission请检查参数配置"
if not self.transmission.transfer_info():
return False, "无法获取Transmission状态,请检查参数配置"
return True, ""
def init_setting(self) -> Tuple[str, Union[str, bool]]: