fix(scripts): skip summary type

main
spacemeowx2 2022-11-28 21:33:35 +08:00 committed by imspace
parent 8e46df1868
commit d136fc563a
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,8 @@ const bosses = new Map<number, string>();
for (const file of files) { for (const file of files) {
try { try {
const content: FileExporterType = JSON.parse(await Deno.readTextFile(file)); const content: FileExporterType = JSON.parse(await Deno.readTextFile(file));
if (content.type === "SUMMARY") continue;
const { data } = content; const { data } = content;
if (data.type === "CoopInfo") { if (data.type === "CoopInfo") {
const eventIds = data.detail.waveResults.map((i) => i.eventWave).filter( const eventIds = data.detail.waveResults.map((i) => i.eventWave).filter(

View File

@ -18,6 +18,7 @@ const ids = new Map<string, string>();
for (const file of files) { for (const file of files) {
try { try {
const content: FileExporterType = JSON.parse(await Deno.readTextFile(file)); const content: FileExporterType = JSON.parse(await Deno.readTextFile(file));
if (content.type === "SUMMARY") continue;
const id = content.data.detail.id; const id = content.data.detail.id;
const rawId = base64.decode(id); const rawId = base64.decode(id);
const uuid = new TextDecoder().decode(rawId.slice(rawId.length - 36)); const uuid = new TextDecoder().decode(rawId.slice(rawId.length - 36));