diff --git a/osu.Server.Queues.ScoreStatisticsProcessor/Helpers/LegacyDatabaseHelper.cs b/osu.Server.Queues.ScoreStatisticsProcessor/Helpers/LegacyDatabaseHelper.cs index 6a2fc203..b111e688 100644 --- a/osu.Server.Queues.ScoreStatisticsProcessor/Helpers/LegacyDatabaseHelper.cs +++ b/osu.Server.Queues.ScoreStatisticsProcessor/Helpers/LegacyDatabaseHelper.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; @@ -120,7 +121,10 @@ public static HttpResponseMessage RunLegacyIO(string command, string method = "G { case string postString: httpRequestMessage.Content = new StringContent(postString); - httpRequestMessage.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("plain/text"); + break; + + case IEnumerable> formKeyValuePairs: + httpRequestMessage.Content = new FormUrlEncodedContent(formKeyValuePairs); break; default: diff --git a/osu.Server.Queues.ScoreStatisticsProcessor/Processors/PlayCountProcessor.cs b/osu.Server.Queues.ScoreStatisticsProcessor/Processors/PlayCountProcessor.cs index 5e37c720..09fbf4ee 100644 --- a/osu.Server.Queues.ScoreStatisticsProcessor/Processors/PlayCountProcessor.cs +++ b/osu.Server.Queues.ScoreStatisticsProcessor/Processors/PlayCountProcessor.cs @@ -2,7 +2,9 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using Dapper; using JetBrains.Annotations; using MySqlConnector; @@ -112,7 +114,7 @@ private static void adjustGlobalBeatmapPlaycount(SoloScore score, MySqlConnectio // Reindex beatmap occasionally. if (RNG.Next(0, 10) == 0) - LegacyDatabaseHelper.RunLegacyIO("indexing/bulk", "POST", $"beatmapset[]={score.beatmap.beatmapset_id}"); + LegacyDatabaseHelper.RunLegacyIO("indexing/bulk", "POST", new[] { new KeyValuePair("beatmapset[]", score.beatmap.beatmapset_id.ToString(CultureInfo.InvariantCulture)) }); // TODO: announce playcount milestones // const int notify_amount = 1000000;