fix attempts to parse appId of 0

This commit is contained in:
pointfeev 2022-02-25 14:08:04 -05:00
parent 7439b7213b
commit 60b32dcc3e
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ internal static class HttpClientManager
"//div[@class='recommendation']/div/a");
if (nodes is not null)
foreach (HtmlNode node in nodes)
if (int.TryParse(node.Attributes?["data-ds-appid"]?.Value, out int dlcAppId) && !dlcIds.Contains(dlcAppId))
if (int.TryParse(node.Attributes?["data-ds-appid"]?.Value, out int dlcAppId) && dlcAppId > 0 && !dlcIds.Contains(dlcAppId))
dlcIds.Add(dlcAppId);
}

View file

@ -5,7 +5,7 @@
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Version>2.5.0.0</Version>
<Version>2.5.0.1</Version>
<PackageIcon>Resources\ini.ico</PackageIcon>
<PackageIconUrl />
<Description>Automatically generates and installs CreamAPI files for Steam games on the user's computer. It can also generate and install CreamAPI for the Paradox Launcher should the user select a Paradox Interactive game.</Description>