diff --git a/src/jmcomic/__init__.py b/src/jmcomic/__init__.py index cb524f8..0d22348 100644 --- a/src/jmcomic/__init__.py +++ b/src/jmcomic/__init__.py @@ -2,7 +2,7 @@ # 被依赖方 <--- 使用方 # config <--- entity <--- toolkit <--- client <--- option <--- downloader -__version__ = '2.5.28' +__version__ = '2.5.29' from .api import * from .jm_plugin import * diff --git a/src/jmcomic/jm_client_impl.py b/src/jmcomic/jm_client_impl.py index 556d991..f06bb78 100644 --- a/src/jmcomic/jm_client_impl.py +++ b/src/jmcomic/jm_client_impl.py @@ -709,6 +709,9 @@ class JmApiClient(AbstractJmClient): }) ) + if resp.res_data.get('name') is None: + ExceptionTool.raise_missing(resp, jmid) + return JmApiAdaptTool.parse_entity(resp.res_data, clazz) def fetch_scramble_id(self, photo_id): diff --git a/src/jmcomic/jm_config.py b/src/jmcomic/jm_config.py index eca27ec..a6d2bf5 100644 --- a/src/jmcomic/jm_config.py +++ b/src/jmcomic/jm_config.py @@ -76,7 +76,7 @@ class JmMagicConstants: APP_TOKEN_SECRET = '18comicAPP' APP_TOKEN_SECRET_2 = '18comicAPPContent' APP_DATA_SECRET = '185Hcomic3PAPP7R' - APP_VERSION = '1.7.5' + APP_VERSION = '1.7.6' # 模块级别共用配置 diff --git a/src/jmcomic/jm_entity.py b/src/jmcomic/jm_entity.py index 7879246..017db68 100644 --- a/src/jmcomic/jm_entity.py +++ b/src/jmcomic/jm_entity.py @@ -443,7 +443,7 @@ class JmAlbumDetail(DetailEntity, Downloadable): super().__init__() self.album_id: str = str(album_id) self.scramble_id: str = str(scramble_id) - self.name: str = name + self.name: str = str(name).strip() self.page_count: int = int(page_count) # 总页数 self.pub_date: str = pub_date # 发布日期 self.update_date: str = update_date # 更新日期 diff --git a/src/jmcomic/jm_option.py b/src/jmcomic/jm_option.py index 94ebd41..79168c3 100644 --- a/src/jmcomic/jm_option.py +++ b/src/jmcomic/jm_option.py @@ -159,7 +159,7 @@ class DirRule: return None def solve_func(detail): - return fix_windir_name(str(DetailEntity.get_dirname(detail, rule[1:]))) + return fix_windir_name(str(DetailEntity.get_dirname(detail, rule[1:]))).strip() return rule[0], solve_func, rule diff --git a/src/jmcomic/jm_toolkit.py b/src/jmcomic/jm_toolkit.py index 68a131c..9da2b91 100644 --- a/src/jmcomic/jm_toolkit.py +++ b/src/jmcomic/jm_toolkit.py @@ -329,7 +329,8 @@ class JmcomicText: limit = JmModuleConfig.VAR_FILE_NAME_LENGTH_LIMIT jm_log('error', f'目录名过长,无法创建目录,强制缩短到{limit}个字符并重试') save_dir = save_dir[0:limit] - mkdir_if_not_exists(save_dir) + return cls.try_mkdir(save_dir) + raise e return save_dir