wip: osu! updating

This commit is contained in:
2025-07-03 16:33:41 +02:00
parent 9182c2c994
commit 75380038ad
4 changed files with 21 additions and 18 deletions

View File

@@ -58,7 +58,9 @@ export const releaseStreamToReadable = (releaseStream: string) => {
export const compareBuildNumbers = (current: string, target: string): number => {
const parse = (version: string): [number, number] => {
const cleaned = version.split(/[^0-9.]/)[0];
const cleaned = version.startsWith('b')
? version.slice(1).split(/[^0-9.]/)[0]
: version.split(/[^0-9.]/)[0];
const [baseStr, hotfixStr] = cleaned.split('.');
const base = parseInt(baseStr, 10);

View File

@@ -145,7 +145,6 @@
}
const versions = compareBuildNumbers($osuBuild, streamInfo);
if (versions > 0) {
launchInfo = 'Update found!';
await new Promise((res) => setTimeout(res, 1500));
@@ -154,7 +153,8 @@
} else {
launchInfo = 'You are up to date!';
}
} catch {
} catch(err) {
console.log(err);
toast.error('Hmmm...', {
description: 'Failed to check for updates.',
});