koishi-plugin-best-cave 1.3.1 → 1.3.3

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.
Files changed (2) hide show
  1. package/lib/index.js +2 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -678,8 +678,10 @@ var HashStorage = class _HashStorage {
678
678
  imgBuffers.map((buffer) => ImageHasher.calculateHash(buffer))
679
679
  );
680
680
  this.hashes.set(caveId, hashes);
681
+ logger3.info(`Added ${hashes.length} hashes for cave ${caveId}`);
681
682
  } else {
682
683
  this.hashes.delete(caveId);
684
+ logger3.info(`Deleted hashes for cave ${caveId}`);
683
685
  }
684
686
  await this.saveHashes();
685
687
  } catch (error) {
@@ -870,10 +872,6 @@ var HashStorage = class _HashStorage {
870
872
  logger3.error(`Failed to process cave ${cave.cave_id}: ${error.message}`);
871
873
  }
872
874
  }
873
- if (updatedCount > 0) {
874
- await this.saveHashes();
875
- logger3.info(`Updated ${updatedCount} new hashes`);
876
- }
877
875
  }
878
876
  /**
879
877
  * 批量处理数组项
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-best-cave",
3
3
  "description": "最好的 cave 插件,可开关的审核系统,可引用添加,支持图文混合内容,可查阅投稿列表,完美复刻你的 .cave 体验!",
4
- "version": "1.3.1",
4
+ "version": "1.3.3",
5
5
  "contributors": [
6
6
  "Yis_Rime <yis_rime@outlook.com>"
7
7
  ],