@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 +4 -2
- package/package.json +1 -1
- package/readme.md +8 -0
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
|
|
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