v2.5.29: 修复本子标题尾随空格导致windows创建文件夹失败的bug (#326)

fix #325
This commit is contained in:
hect0x7 2025-01-24 22:26:05 +08:00 committed by GitHub
parent 397d4ab95c
commit fc5d2b9793
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 5 deletions

View File

@ -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 *

View File

@ -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):

View File

@ -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'
# 模块级别共用配置

View File

@ -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 # 更新日期

View File

@ -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

View File

@ -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