Catch RequestFreeAppLicense exception

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

@ -223,11 +223,19 @@ namespace DepotDownloader
} }
public async Task<bool> RequestFreeAppLicense(uint appId) public async Task<bool> RequestFreeAppLicense(uint appId)
{
try
{ {
var resultInfo = await steamApps.RequestFreeLicense(appId); 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) public async Task RequestDepotKey(uint depotId, uint appid = 0)
{ {

Loading…
Cancel
Save