feat: add osu! version and release stream retrieval, along with skins count functionality

This commit is contained in:
2025-07-03 14:23:11 +02:00
parent a677755451
commit 2896a68757
8 changed files with 295 additions and 31 deletions

View File

@@ -1,7 +1,15 @@
<script lang="ts">
import Logo from '$assets/logo.png';
import { estimateRefreshRate } from '@/displayUtils';
import { beatmapSets, currentLoadingInfo, currentView, firstStartup } from '@/global';
import {
beatmapSets,
currentLoadingInfo,
currentView,
firstStartup,
osuBuild,
osuStream,
skins,
} from '@/global';
import {
cursorSmoothness,
osuInstallationPath,
@@ -107,13 +115,27 @@
description: 'Your previously set osu! installation path seems to be invalid.',
});
} else {
currentLoadingInfo.set('Getting osu version...');
const osuReleaseStream: string = await invoke('get_osu_release_stream', {
folder: $osuInstallationPath,
});
osuStream.set(osuReleaseStream);
const osuVersion: string = await invoke('get_osu_version', {
folder: $osuInstallationPath,
});
osuBuild.set(osuVersion);
currentLoadingInfo.set('Counting beatmapsets...');
const beatmapSetCount: number | null = await invoke('get_beatmapsets_count', {
folder: $osuInstallationPath,
});
if (beatmapSetCount) {
beatmapSets.set(beatmapSetCount);
}
if (beatmapSetCount) beatmapSets.set(beatmapSetCount);
currentLoadingInfo.set('Counting skins...');
const skinCount: number | null = await invoke('get_skins_count', {
folder: $osuInstallationPath,
});
if (skinCount) skins.set(skinCount);
}
}