refactor: 优化漫画详情解析逻辑 (#101)

* refactor: 优化漫画详情解析逻辑并格式化代码

- 将漫画详情返回对象改为 ComicDetails 实例
- 新增 updateDate 字段并转换日期格式

* chore: 更新包子漫画版本号至1.0.5
This commit is contained in:
Brooklyn Bartly
2025-07-22 15:02:55 +08:00
committed by GitHub
parent 4af4822558
commit c55657f0a2
2 changed files with 29 additions and 27 deletions

View File

@@ -5,7 +5,7 @@ class Baozi extends ComicSource {
// 唯一标识符
key = "baozi"
version = "1.0.4"
version = "1.0.5"
minAppVersion = "1.0.0"
@@ -338,19 +338,21 @@ class Baozi extends ComicSource {
})
}
}
// updateTime 将 Y年 M月 D日 转化为 Y-M-D
let updateDate = updateTime.replace(/年/g, '-').replace(/月/g, '-').replace(/日/g, '');
return {
return new ComicDetails({
title: title,
cover: cover,
description: description,
tags: {
"作者": [author],
"更新": [updateTime],
"标签": tags
},
chapters: chapters,
recommend: recommend
}
recommend: recommend,
updateTime: updateDate,
})
},
loadEp: async (comicId, epId) => {
const images = [];

View File

@@ -15,7 +15,7 @@
"name": "包子漫画",
"fileName": "baozi.js",
"key": "baozi",
"version": "1.0.4"
"version": "1.0.5"
},
{
"name": "Picacg",