From da1fb0babb409c46ac10c2df2c4ec1b1dc5526fa Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Tue, 31 May 2022 15:59:56 +0100 Subject: [PATCH] fix: faulty merge when s3 0.59 changes were added back into this branch --- .../import-types/file/solid-state-squad/parser.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/lib/score-import/import-types/file/solid-state-squad/parser.ts b/server/src/lib/score-import/import-types/file/solid-state-squad/parser.ts index 9dc01acaf..8a084063e 100644 --- a/server/src/lib/score-import/import-types/file/solid-state-squad/parser.ts +++ b/server/src/lib/score-import/import-types/file/solid-state-squad/parser.ts @@ -66,7 +66,7 @@ const PR_SOLID_STATE: PrudenceSchema = { const xmlParser = new XMLParser(); // .59 is a song that is interpreted as a float by our XML parser. -type PreStringifiedS3Score = Omit & { songname: 0.59 | string }; +type PreStringifiedS3Score = Omit & { songname: string | 0.59 }; export function ParseSolidStateXML( fileData: Express.Multer.File, @@ -117,10 +117,11 @@ export function ParseSolidStateXML( throw new ScoreImportFatalError(400, FormatPrError(err, "Invalid S3 XML.")); } - let scoreData = parsedXML.s3data.scoredata.song as PreStringifiedS3Score[]; + let scoreData = maybeSongs as Array; scoreData = scoreData.map((e) => ({ ...e, + // Songnames here are either numbers or strings due to a disgusting hack // @see #718 // We forcibly convert all these back to strings. @@ -133,7 +134,7 @@ export function ParseSolidStateXML( return { classHandler: null, context: {}, - iterable: maybeSongs as Array, + iterable: scoreData as Array, game: "iidx", }; }