@wahaha216/koishi-plugin-jmcomic 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -143,7 +143,7 @@ function sanitizeFileName(fileName) {
143
143
  if (sanitizedFileName.trim() === "") {
144
144
  return "untitled_document";
145
145
  }
146
- return fileName;
146
+ return sanitizedFileName;
147
147
  }
148
148
  __name(sanitizeFileName, "sanitizeFileName");
149
149
  async function limitPromiseAll(promises, limit) {
@@ -992,8 +992,8 @@ var JMAppClient = class _JMAppClient extends JMClientAbstract {
992
992
  async photoToPdf(photo, pdfName, type = "photo", albumId = "", single = false, password) {
993
993
  const images = photo.getImages();
994
994
  const id = photo.getId();
995
- if (this.config.debug) this.logger.info(`开始生成PDF ${pdfName}.pdf`);
996
995
  pdfName = sanitizeFileName(pdfName);
996
+ if (this.config.debug) this.logger.info(`开始生成PDF ${pdfName}.pdf`);
997
997
  let path = (0, import_path2.join)(this.root, type, `${id}`);
998
998
  if (type === "album") {
999
999
  path = (0, import_path2.join)(this.root, type, `${albumId}`);
@@ -1045,6 +1045,7 @@ var JMAppClient = class _JMAppClient extends JMClientAbstract {
1045
1045
  const id = album.getId();
1046
1046
  const series = album.getSeries();
1047
1047
  const zipName = sanitizeFileName(album.getName());
1048
+ if (this.config.debug) this.logger.info(`开始生成ZIP ${zipName}.zip`);
1048
1049
  const path = (0, import_path2.join)(this.root, "album", `${id}`);
1049
1050
  const directorys = [];
1050
1051
  if (series.length > 1) {
@@ -1065,6 +1066,7 @@ var JMAppClient = class _JMAppClient extends JMClientAbstract {
1065
1066
  async photoToZip(photo, zipName, password, level = 6) {
1066
1067
  const id = photo.getId();
1067
1068
  zipName = sanitizeFileName(zipName);
1069
+ if (this.config.debug) this.logger.info(`开始生成ZIP ${zipName}.zip`);
1068
1070
  const path = (0, import_path2.join)(this.root, "photo", `${id}`);
1069
1071
  const zipPath = (0, import_path2.join)(path, `${zipName}.zip`);
1070
1072
  await archiverImage(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wahaha216/koishi-plugin-jmcomic",
3
3
  "description": "下载JM本子,无需python。支持pdf、zip加密。",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -17,6 +17,14 @@ jm queue
17
17
 
18
18
  ## 更新日志
19
19
 
20
+ <details>
21
+ <summary>0.2.4</summary>
22
+
23
+ 1. 调整debug日志
24
+ 2. 修正文化名返回值
25
+
26
+ </details>
27
+
20
28
  <details>
21
29
  <summary>0.2.3</summary>
22
30