mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 10:28:04 +03:00
add a stat script for checks
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import CreateLogCtx from "../../../src/common/logger";
|
||||
import db from "../../../src/db/db";
|
||||
|
||||
const logger = CreateLogCtx("scripts/single-use/fix-iidx-versions/stat.ts");
|
||||
|
||||
(async () => {
|
||||
const charts = await db.charts.iidx.find({ versions: { $size: 0 } });
|
||||
|
||||
for (const chart of charts) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const song = await db.songs.iidx.findOne({ id: chart.songID });
|
||||
|
||||
if (!song) {
|
||||
logger.error(`cannot find parent song ${chart.songID}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.info(`${song.title} ${chart.playtype} ${chart.difficulty}`);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user