This commit is contained in:
JustArchi
2020-06-15 15:55:59 +02:00
parent 4b570f7928
commit ce5443ca9a

View File

@@ -671,11 +671,27 @@ namespace ArchiSteamFarm {
}
}
SteamApps.PICSTokensCallback tokenCallback = null;
for (byte i = 0; (i < WebBrowser.MaxTries) && (tokenCallback == null) && IsConnectedAndLoggedOn; i++) {
try {
tokenCallback = await SteamApps.PICSGetAccessTokens(appID, null);
} catch (Exception e) {
ArchiLogger.LogGenericWarningException(e);
}
}
if (tokenCallback == null) {
return (optimisticDiscovery ? appID : 0, DateTime.MinValue, true);
}
SteamApps.PICSRequest request = new SteamApps.PICSRequest(appID, tokenCallback.AppTokens.TryGetValue(appID, out ulong accessToken) ? accessToken : 0, false);
AsyncJobMultiple<SteamApps.PICSProductInfoCallback>.ResultSet productInfoResultSet = null;
for (byte i = 0; (i < WebBrowser.MaxTries) && (productInfoResultSet == null) && IsConnectedAndLoggedOn; i++) {
try {
productInfoResultSet = await SteamApps.PICSGetProductInfo(appID, null, false);
productInfoResultSet = await SteamApps.PICSGetProductInfo(request.ToEnumerable(), Enumerable.Empty<SteamApps.PICSRequest>());
} catch (Exception e) {
ArchiLogger.LogGenericWarningException(e);
}