mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Decode game names, closes #99
This commit is contained in:
@@ -118,7 +118,10 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
foreach (KeyValue lineItem in ReceiptInfo["lineitems"].Children) {
|
||||
Items.Add((uint) lineItem["PackageID"].AsUnsignedLong(), lineItem["ItemDescription"].AsString());
|
||||
uint appID = (uint) lineItem["PackageID"].AsUnsignedLong();
|
||||
string gameName = lineItem["ItemDescription"].AsString();
|
||||
gameName = Utilities.UrlDecode(gameName); // Apparently steam expects client to decode sent HTML
|
||||
Items.Add(appID, gameName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
*/
|
||||
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -71,5 +72,13 @@ namespace ArchiSteamFarm {
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
internal static string UrlDecode(string message) {
|
||||
if (string.IsNullOrEmpty(message)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return WebUtility.UrlDecode(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user