diff --git a/app/chain/__init__.py b/app/chain/__init__.py index 50b0b4c6..e0bcd08e 100644 --- a/app/chain/__init__.py +++ b/app/chain/__init__.py @@ -325,8 +325,7 @@ class ChainBase(metaclass=ABCMeta): def transfer(self, path: Path, meta: MetaBase, mediainfo: MediaInfo, transfer_type: str, target: Path = None, - episodes_info: List[TmdbEpisode] = None, - downloader: str = settings.DEFAULT_DOWNLOADER) -> Optional[TransferInfo]: + episodes_info: List[TmdbEpisode] = None) -> Optional[TransferInfo]: """ 文件转移 :param path: 文件路径 @@ -335,12 +334,10 @@ class ChainBase(metaclass=ABCMeta): :param transfer_type: 转移模式 :param target: 转移目标路径 :param episodes_info: 当前季的全部集信息 - :param downloader: 下载器 :return: {path, target_path, message} """ return self.run_module("transfer", path=path, meta=meta, mediainfo=mediainfo, - transfer_type=transfer_type, target=target, - episodes_info=episodes_info, downloader=downloader) + transfer_type=transfer_type, target=target, episodes_info=episodes_info) def transfer_completed(self, hashs: Union[str, list], path: Path = None, downloader: str = settings.DEFAULT_DOWNLOADER) -> None: diff --git a/app/core/meta/metabase.py b/app/core/meta/metabase.py index 9b395e13..fdb93dbf 100644 --- a/app/core/meta/metabase.py +++ b/app/core/meta/metabase.py @@ -131,6 +131,10 @@ class MetaBase(object): except Exception as err: logger.debug(f'识别季失败:{str(err)} - {traceback.format_exc()}') return + if begin_season and begin_season > 100: + return + if end_season and end_season > 100: + return if self.begin_season is None and isinstance(begin_season, int): self.begin_season = begin_season self.total_season = 1 @@ -162,6 +166,10 @@ class MetaBase(object): except Exception as err: logger.debug(f'识别集失败:{str(err)} - {traceback.format_exc()}') return + if begin_episode and begin_episode >= 10000: + return + if end_episode and end_episode >= 10000: + return if self.begin_episode is None and isinstance(begin_episode, int): self.begin_episode = begin_episode self.total_episode = 1 diff --git a/app/modules/qbittorrent/__init__.py b/app/modules/qbittorrent/__init__.py index 17471b5b..7950f44f 100644 --- a/app/modules/qbittorrent/__init__.py +++ b/app/modules/qbittorrent/__init__.py @@ -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]]: diff --git a/app/modules/themoviedb/category.py b/app/modules/themoviedb/category.py index daf2f091..ff3ff459 100644 --- a/app/modules/themoviedb/category.py +++ b/app/modules/themoviedb/category.py @@ -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) diff --git a/app/modules/transmission/__init__.py b/app/modules/transmission/__init__.py index 34b2f58f..09a0b264 100644 --- a/app/modules/transmission/__init__.py +++ b/app/modules/transmission/__init__.py @@ -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]]: diff --git a/version.py b/version.py index 77478818..447b04e5 100644 --- a/version.py +++ b/version.py @@ -1 +1 @@ -APP_VERSION = 'v1.7.0-1' +APP_VERSION = 'v1.7.1'