osu!web enhancement

Some small improvements to osu!web, featuring beatmapset filter and profile page improvement.

< Feedback on osu!web enhancement

Review: Good - script works

§
Posted: 2025-05-05

To solve the osu db problem, please modify the code as follows:

为解决osudb问题,请按照以下步骤修改代码:

          osuSRInfoArr: (iter.osuVersion >= 20140609) ? IntDoubleArray(arr, iter) : undefined,
          taikoSRInfoArr: (iter.osuVersion >= 20140609) ? IntDoubleArray(arr, iter) : undefined,
          catchSRInfoArr: (iter.osuVersion >= 20140609) ? IntDoubleArray(arr, iter) : undefined,
          maniaSRInfoArr: (iter.osuVersion >= 20140609) ? IntDoubleArray(arr, iter) : undefined,

---->

          osuSRInfoArr: (iter.osuVersion >= 20250108) ? IntFloatArray(arr, iter) : IntDoubleArray(arr, iter),
          taikoSRInfoArr: (iter.osuVersion >= 20250108) ? IntFloatArray(arr, iter) : IntDoubleArray(arr, iter),
          catchSRInfoArr: (iter.osuVersion >= 20250108) ? IntFloatArray(arr, iter) : IntDoubleArray(arr, iter),
          maniaSRInfoArr: (iter.osuVersion >= 20250108) ? IntFloatArray(arr, iter) : IntDoubleArray(arr, iter),

add the code after "const IntDouble" and "const IntDoubleArray"

在"const IntDouble"后"const IntDoubleArray"添加以下代码

  const IntFloat = (arr, iter) => {
    const r = {int: 0, double: 0};
    const m1 = arr[iter.nxtpos++];
    console.assert(m1 === 0x08, `error occurred while parsing Int-Double pair at ${iter.nxtpos - 1} with value 0x${m1.toString(16)}: should be 0x8.`);
    r.int = Int(arr, iter);
    const m2 = arr[iter.nxtpos++];
    console.assert(m2 === 0x0c, `error occurred while parsing Int-Double pair at ${iter.nxtpos - 1} with value 0x${m1.toString(16)}: should be 0x8.`);
    r.double = Single(arr, iter);
    return r;
  };
  const IntFloatArray = (arr, iter) => {
      const r = new Array(Int(arr, iter));
      for(let i = 0; i < r.length; i++) r[i] = IntFloat(arr, iter);
      return r;
  };

Post reply

Sign in to post a reply.