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

View File

@ -325,8 +325,7 @@ class ChainBase(metaclass=ABCMeta):
def transfer(self, path: Path, meta: MetaBase, mediainfo: MediaInfo, def transfer(self, path: Path, meta: MetaBase, mediainfo: MediaInfo,
transfer_type: str, target: Path = None, transfer_type: str, target: Path = None,
episodes_info: List[TmdbEpisode] = None, episodes_info: List[TmdbEpisode] = None) -> Optional[TransferInfo]:
downloader: str = settings.DEFAULT_DOWNLOADER) -> Optional[TransferInfo]:
""" """
文件转移 文件转移
:param path: 文件路径 :param path: 文件路径
@ -335,12 +334,10 @@ class ChainBase(metaclass=ABCMeta):
:param transfer_type: 转移模式 :param transfer_type: 转移模式
:param target: 转移目标路径 :param target: 转移目标路径
:param episodes_info: 当前季的全部集信息 :param episodes_info: 当前季的全部集信息
:param downloader: 下载器
:return: {path, target_path, message} :return: {path, target_path, message}
""" """
return self.run_module("transfer", path=path, meta=meta, mediainfo=mediainfo, return self.run_module("transfer", path=path, meta=meta, mediainfo=mediainfo,
transfer_type=transfer_type, target=target, transfer_type=transfer_type, target=target, episodes_info=episodes_info)
episodes_info=episodes_info, downloader=downloader)
def transfer_completed(self, hashs: Union[str, list], path: Path = None, def transfer_completed(self, hashs: Union[str, list], path: Path = None,
downloader: str = settings.DEFAULT_DOWNLOADER) -> None: downloader: str = settings.DEFAULT_DOWNLOADER) -> None:

View File

@ -131,6 +131,10 @@ class MetaBase(object):
except Exception as err: except Exception as err:
logger.debug(f'识别季失败:{str(err)} - {traceback.format_exc()}') logger.debug(f'识别季失败:{str(err)} - {traceback.format_exc()}')
return 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): if self.begin_season is None and isinstance(begin_season, int):
self.begin_season = begin_season self.begin_season = begin_season
self.total_season = 1 self.total_season = 1
@ -162,6 +166,10 @@ class MetaBase(object):
except Exception as err: except Exception as err:
logger.debug(f'识别集失败:{str(err)} - {traceback.format_exc()}') logger.debug(f'识别集失败:{str(err)} - {traceback.format_exc()}')
return 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): if self.begin_episode is None and isinstance(begin_episode, int):
self.begin_episode = begin_episode self.begin_episode = begin_episode
self.total_episode = 1 self.total_episode = 1

View File

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

View File

@ -107,7 +107,7 @@ class CategoryHelper(metaclass=Singleton):
:return: 二级分类的名称 :return: 二级分类的名称
""" """
genre_ids = tmdb_info.get("genre_ids") or [] 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)): and set(genre_ids).intersection(set(settings.ANIME_GENREIDS)):
return self.get_category(self._anime_categorys, tmdb_info) return self.get_category(self._anime_categorys, tmdb_info)
return self.get_category(self._tv_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(): if self.transmission.is_inactive():
self.transmission.reconnect() self.transmission.reconnect()
if self.transmission.is_inactive(): if not self.transmission.transfer_info():
return False, "无法连接Transmission,请检查参数配置" return False, "无法获取Transmission状态,请检查参数配置"
return True, "" return True, ""
def init_setting(self) -> Tuple[str, Union[str, bool]]: def init_setting(self) -> Tuple[str, Union[str, bool]]:

View File

@ -1 +1 @@
APP_VERSION = 'v1.7.0-1' APP_VERSION = 'v1.7.1'