Compare commits

..

No commits in common. "0005f3d74b1d85f77cea0065cfd7331a2b25f856" and "3c736674acff48559f6f2941c861ea4ad939739e" have entirely different histories.

2 changed files with 73 additions and 85 deletions

View File

@ -101,17 +101,14 @@ namespace auto_creamapi.Services
public async Task<List<SteamApp>> GetListOfDlc(SteamApp steamApp, bool useSteamDb, bool ignoreUnknown) public async Task<List<SteamApp>> GetListOfDlc(SteamApp steamApp, bool useSteamDb, bool ignoreUnknown)
{ {
MyLogger.Log.Debug("Start: GetListOfDlc"); MyLogger.Log.Information("Get DLC");
var dlcList = new List<SteamApp>(); var dlcList = new List<SteamApp>();
try
{
if (steamApp != null) if (steamApp != null)
{ {
var steamAppDetails = await AppDetails.GetAsync(steamApp.AppId).ConfigureAwait(false); var steamAppDetails = await AppDetails.GetAsync(steamApp.AppId).ConfigureAwait(false);
if (steamAppDetails != null) if (steamAppDetails != null)
{ {
MyLogger.Log.Debug("Type for Steam App {Name}: \"{Type}\"", steamApp.Name, MyLogger.Log.Debug("Type for Steam App {Name}: \"{Type}\"", steamApp.Name, steamAppDetails.Type);
steamAppDetails.Type);
if (steamAppDetails.Type == "game" | steamAppDetails.Type == "demo") if (steamAppDetails.Type == "game" | steamAppDetails.Type == "demo")
{ {
steamAppDetails.DLC.ForEach(x => steamAppDetails.DLC.ForEach(x =>
@ -120,8 +117,8 @@ namespace auto_creamapi.Services
if (result == null) return; if (result == null) return;
var dlcDetails = AppDetails.GetAsync(x).Result; var dlcDetails = AppDetails.GetAsync(x).Result;
dlcList.Add(dlcDetails != null dlcList.Add(dlcDetails != null
? new SteamApp {AppId = dlcDetails.SteamAppId, Name = dlcDetails.Name} ? new SteamApp { AppId = dlcDetails.SteamAppId, Name = dlcDetails.Name }
: new SteamApp {AppId = x, Name = $"Unknown DLC {x}"}); : new SteamApp { AppId = x, Name = $"Unknown DLC {x}" });
}); });
dlcList.ForEach(x => MyLogger.Log.Debug("{AppId}={Name}", x.AppId, x.Name)); dlcList.ForEach(x => MyLogger.Log.Debug("{AppId}={Name}", x.AppId, x.Name));
@ -182,7 +179,6 @@ namespace auto_creamapi.Services
} }
} }
} }
dlcList.ForEach(x => MyLogger.Log.Debug("{AppId}={Name}", x.AppId, x.Name)); dlcList.ForEach(x => MyLogger.Log.Debug("{AppId}={Name}", x.AppId, x.Name));
MyLogger.Log.Information("Got DLC from SteamDB successfully..."); MyLogger.Log.Information("Got DLC from SteamDB successfully...");
} }
@ -198,7 +194,7 @@ namespace auto_creamapi.Services
} }
else else
{ {
MyLogger.Log.Error("Could not get DLC: Could not get Steam App details"); MyLogger.Log.Error("Could not get DLC...");
} }
} }
else else
@ -206,14 +202,6 @@ namespace auto_creamapi.Services
MyLogger.Log.Error("Could not get DLC: Invalid Steam App"); MyLogger.Log.Error("Could not get DLC: Invalid Steam App");
} }
//return dlcList;
}
catch (Exception e)
{
MyLogger.Log.Error("Could not get DLC!");
Console.WriteLine(e);
}
return dlcList; return dlcList;
} }
} }

View File

@ -5,12 +5,12 @@
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>auto_creamapi</RootNamespace> <RootNamespace>auto_creamapi</RootNamespace>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<PackageVersion>2.1.7</PackageVersion> <PackageVersion>2.1.6</PackageVersion>
<Title>auto-creamapi</Title> <Title>auto-creamapi</Title>
<Authors>Jeddunk</Authors> <Authors>Jeddunk</Authors>
<Company>jeddunk.xyz</Company> <Company>jeddunk.xyz</Company>
<AssemblyVersion>2.1.7</AssemblyVersion> <AssemblyVersion>2.1.6</AssemblyVersion>
<FileVersion>2.1.7</FileVersion> <FileVersion>2.1.6</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">