mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-04 04:48:15 +03:00
fix: enable fervidex30
This commit is contained in:
@@ -12,4 +12,7 @@ export const EXT_HEROIC_VERSE = "2020092900";
|
||||
export const EXT_BISTROVER = "2021091500";
|
||||
export const EXT_CASTHOUR = "2022082400";
|
||||
|
||||
// first datecode of many, probably
|
||||
export const EXT_RESIDENT = ["2022103100"];
|
||||
|
||||
export const MODEL_SDVX3_KONASTE = "QCV";
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
EXT_BISTROVER,
|
||||
EXT_CASTHOUR,
|
||||
EXT_HEROIC_VERSE,
|
||||
EXT_RESIDENT,
|
||||
MODEL_IIDX,
|
||||
MODEL_IIDX_LIGHTNING,
|
||||
MODEL_INFINITAS_2,
|
||||
@@ -17,6 +18,7 @@ import type { ParserFunctionReturns } from "../../common/types";
|
||||
import type { FerHeaders as FervidexHeaders, FervidexContext, FervidexScore } from "./types";
|
||||
import type { KtLogger } from "lib/logger/logger";
|
||||
import type { PrudenceSchema, ValidSchemaValue } from "prudence";
|
||||
import type { GPTSupportedVersions } from "tachi-common";
|
||||
|
||||
const PR_FERVIDEX: PrudenceSchema = {
|
||||
chart: p.isIn("spb", "spn", "dpn", "sph", "dph", "spa", "dpa", "spl", "dpl"),
|
||||
@@ -73,7 +75,10 @@ const PR_FERVIDEX: PrudenceSchema = {
|
||||
* Converts a string of the form LDJ:X:X:X:2020092900 into a game version.
|
||||
* I don't really understand the software model format, so this is lazy.
|
||||
*/
|
||||
export function SoftwareIDToVersion(model: string, logger: KtLogger) {
|
||||
export function SoftwareIDToVersion(
|
||||
model: string,
|
||||
logger: KtLogger
|
||||
): GPTSupportedVersions["iidx:DP" | "iidx:SP"] {
|
||||
try {
|
||||
const data = ParseEA3SoftID(model);
|
||||
|
||||
@@ -104,6 +109,10 @@ export function SoftwareIDToVersion(model: string, logger: KtLogger) {
|
||||
} else if (data.rev === REV_OMNIMIX) {
|
||||
return "29-omni";
|
||||
}
|
||||
} else if (EXT_RESIDENT.includes(data.ext)) {
|
||||
if (data.rev === REV_NORMAL) {
|
||||
return "30";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { Router } from "express";
|
||||
import db from "external/mongo/db";
|
||||
import {
|
||||
EXT_BISTROVER,
|
||||
EXT_CASTHOUR,
|
||||
EXT_HEROIC_VERSE,
|
||||
MODEL_INFINITAS_2,
|
||||
REV_2DXBMS,
|
||||
} from "lib/constants/ea3id";
|
||||
import { MODEL_INFINITAS_2, REV_2DXBMS } from "lib/constants/ea3id";
|
||||
import { SYMBOL_TACHI_API_AUTH } from "lib/constants/tachi";
|
||||
import CreateLogCtx from "lib/logger/logger";
|
||||
import { ExpressWrappedScoreImportMain } from "lib/score-import/framework/express-wrapper";
|
||||
@@ -74,8 +68,6 @@ const ValidateFervidexHeader: RequestHandler = (req, res, next) => {
|
||||
next();
|
||||
};
|
||||
|
||||
const supportedExts = [EXT_HEROIC_VERSE, EXT_BISTROVER, EXT_CASTHOUR];
|
||||
|
||||
const ValidateModelHeader: RequestHandler = (req, res, next) => {
|
||||
const swModel = req.header("X-Software-Model");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user