1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Avoid sending empty parameters in GetBeatmapRequest

This commit is contained in:
Dean Herbert 2021-12-03 16:23:39 +09:00
parent bd5140cbdf
commit dad5b06e84

View File

@ -26,8 +26,11 @@ namespace osu.Game.Online.API.Requests
{
var request = base.CreateWebRequest();
if (beatmapInfo.OnlineID > 0)
request.AddParameter(@"id", beatmapInfo.OnlineID.ToString());
if (!string.IsNullOrEmpty(beatmapInfo.MD5Hash))
request.AddParameter(@"checksum", beatmapInfo.MD5Hash);
if (!string.IsNullOrEmpty(filename))
request.AddParameter(@"filename", filename);
return request;