Catch RequestFreeAppLicense exception

pull/476/head DepotDownloader_2.7.4
Pavel Djundik 10 months ago
parent 2a939053d0
commit 0fb803b5f6

@ -224,9 +224,17 @@ namespace DepotDownloader
public async Task<bool> RequestFreeAppLicense(uint appId)
{
var resultInfo = await steamApps.RequestFreeLicense(appId);
try
{
var resultInfo = await steamApps.RequestFreeLicense(appId);
return resultInfo.GrantedApps.Contains(appId);
return resultInfo.GrantedApps.Contains(appId);
}
catch (Exception ex)
{
Console.WriteLine($"Failed to request FreeOnDemand license for app {appId}: {ex.Message}");
return false;
}
}
public async Task RequestDepotKey(uint depotId, uint appid = 0)

Loading…
Cancel
Save