From e5a42425c133c35a306ebc7bdcfa771c79a93855 Mon Sep 17 00:00:00 2001 From: xh321 Date: Mon, 16 Sep 2024 00:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=92=A4=E5=9B=9E=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=90=8E=E9=A2=84=E8=A7=88=E5=9B=BE=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E8=BD=AC=E5=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- imgDownloader.js | 24 +++++++++--------------- manifest.json | 4 ++-- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/imgDownloader.js b/imgDownloader.js index 869b6f9..db2d20e 100644 --- a/imgDownloader.js +++ b/imgDownloader.js @@ -52,21 +52,15 @@ class ImgDownloader { const thumbMap = new Map([ [ 0, - pic.sourcePath - .replace("Ori", "Thumb") - .replace(pic.md5HexStr, pic.md5HexStr + "_0_recalled"), + pic.sourcePath, ], [ 198, - pic.sourcePath - .replace("Ori", "Thumb") - .replace(pic.md5HexStr, pic.md5HexStr + "_198_recalled"), + pic.sourcePath, ], [ 720, - pic.sourcePath - .replace("Ori", "Thumb") - .replace(pic.md5HexStr, pic.md5HexStr + "_720_recalled"), + pic.sourcePath, ], ]); const picUrl = await this.getImageUrl(el.picElement); @@ -87,12 +81,12 @@ class ImgDownloader { this.output("Pic already existed, skip.", pic.sourcePath); } //需要复制原图到预览图目录 - thumbMap.forEach(async (el, key) => { - if (!fs.existsSync(el)) { - this.output("Copy thumbs:", `source: ${pic.sourcePath} to ${el}`); - fs.copyFile(pic.sourcePath, el); - } - }); + // thumbMap.forEach(async (el, key) => { + // if (!fs.existsSync(el)) { + // this.output("Copy thumbs:", `source: ${pic.sourcePath} to ${el}`); + // fs.copyFile(pic.sourcePath, el); + // } + // }); // 修复本地数据中的错误 if ( diff --git a/manifest.json b/manifest.json index d9b68d3..14cb5db 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "name": "防撤回", "slug": "anti_recall", "description": "防止QQNT撤回消息", - "version": "0.2.45", + "version": "0.2.46", "icon": "./icon.png", "authors": [ { @@ -16,7 +16,7 @@ "repo": "xh321/LiteLoaderQQNT-Anti-Recall", "branch": "master", "release": { - "tag": "0.2.45", + "tag": "0.2.46", "file": "qq-anti-recall.zip" } },