Compare commits

..

No commits in common. "4669e1c0d4e1cc9f087bc72adebb28444910dbbd" and "8fece9090f962d587cf8ce29f66070c01ddb5c6c" have entirely different histories.

5 changed files with 4 additions and 19 deletions

3
.gitignore vendored
View File

@ -14,8 +14,7 @@ app/**
settings.json
comic_config.json
**/comic_config.json
compile/
compile/**
compiled/
deploy-scripts/
.pnpm-store/**

View File

@ -6,7 +6,7 @@
"scripts": {
"compile": "swc src --out-dir compile",
"dev": "nodemon -r @swc-node/register --enable-source-maps --exec node app.ts",
"start": "node compile/src/app.js"
"start": "node compile/app.js"
},
"author": "",
"license": "ISC",

View File

@ -14,7 +14,7 @@ interface ComicDesc {
character?: string[];
tags?: string[];
}
const ImageExt = [".gif", ".png", ".jpeg", ".bmp", ".webp", ".jpg", ".avif"];
const ImageExt = [".gif", ".png", ".jpeg", ".bmp", ".webp", ".jpg"];
export class ComicReferrer extends createDefaultClass("comic") {
desc: ComicDesc | undefined;
pagenum: number;

View File

@ -21,20 +21,6 @@ class SqliteDocumentAccessor implements DocumentAccessor {
throw new Error("Method not implemented.");
}
async addList(content_list: DocumentBody[]): Promise<number[]> {
if (content_list.length === 0) return [];
if (content_list.length > 256) {
// if content_list is too long, split it.
const chunkLength = 256;
const chunked = [];
for (let i = 0; i < content_list.length; i += chunkLength) {
chunked.push(content_list.slice(i, i + chunkLength));
}
const ids = [];
for (const chunk of chunked) {
ids.push(await this.addList(chunk));
}
return ids.flat();
}
return await this.kysely.transaction().execute(async (trx) => {
// add tags
const tagCollected = new Set<string>();

View File

@ -68,7 +68,7 @@ function releaseZip(path: string) {
}
async function renderZipImage(ctx: Context, path: string, page: number) {
const image_ext = ["gif", "png", "jpeg", "bmp", "webp", "jpg", "avif"];
const image_ext = ["gif", "png", "jpeg", "bmp", "webp", "jpg"];
const marked = markUseZip(path);
const zip = await acquireZip(path, marked);
const entries = (await entriesByNaturalOrder(zip)).filter((x) => {