1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-28 20:40:46 +08:00

Ensure only ranked/approved/loved lookups occur on local cached source

This commit is contained in:
Dean Herbert
2025-03-11 16:37:46 +09:00
Unverified
parent 5ef2479e24
commit 8d83dfede7
@@ -277,7 +277,11 @@ namespace osu.Game.Beatmaps
FROM `osu_beatmaps` AS `b`
JOIN `osu_beatmapsets` AS `s` ON `s`.`beatmapset_id` = `b`.`beatmapset_id`
WHERE `b`.`checksum` = @MD5Hash OR `b`.`filename` = @Path
AND `b`.`approved` in (1, 2, 4)
""";
// approved conditional can theoretically be removed as it was fixed in
// https://github.com/ppy/osu-onlinedb-generator/commit/489ac000775c3ff63bc914efb83cad0f6fbde261
// but it's also safe to leave it (should not affect performance).
cmd.Parameters.Add(new SqliteParameter(@"@MD5Hash", beatmapInfo.MD5Hash));
cmd.Parameters.Add(new SqliteParameter(@"@Path", beatmapInfo.Path));