Skip to content

Commit

Permalink
Update steamkit, use new cdn auth token function
Browse files Browse the repository at this point in the history
Fixes #545
  • Loading branch information
xPaw committed Oct 13, 2024
1 parent 5a695e6 commit 6a0147e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DepotDownloader/DepotDownloader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<RollForward>LatestMajor</RollForward>
<Version>2.7.2</Version>
<Version>2.7.3</Version>
<Description>Steam Downloading Utility</Description>
<Authors>SteamRE Team</Authors>
<Copyright>Copyright © SteamRE Team 2024</Copyright>
Expand All @@ -26,6 +26,6 @@
</PackageReference>
<PackageReference Include="protobuf-net" Version="3.2.30" />
<PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="SteamKit2" Version="3.0.0-Beta.3" />
<PackageReference Include="SteamKit2" Version="3.0.0-Beta.4" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions DepotDownloader/Steam3Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ReadOnlyCollection<SteamApps.LicenseListCallback.License> Licenses
public Dictionary<uint, ulong> AppTokens { get; } = [];
public Dictionary<uint, ulong> PackageTokens { get; } = [];
public Dictionary<uint, byte[]> DepotKeys { get; } = [];
public ConcurrentDictionary<(uint, string), TaskCompletionSource<SteamApps.CDNAuthTokenCallback>> CDNAuthTokens { get; } = [];
public ConcurrentDictionary<(uint, string), TaskCompletionSource<SteamContent.CDNAuthToken>> CDNAuthTokens { get; } = [];
public Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo> AppInfo { get; } = [];
public Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo> PackageInfo { get; } = [];
public Dictionary<string, byte[]> AppBetaPasswords { get; } = [];
Expand Down Expand Up @@ -291,7 +291,7 @@ public async Task<ulong> GetDepotManifestRequestCodeAsync(uint depotId, uint app
public async Task RequestCDNAuthToken(uint appid, uint depotid, Server server)
{
var cdnKey = (depotid, server.Host);
var completion = new TaskCompletionSource<SteamApps.CDNAuthTokenCallback>();
var completion = new TaskCompletionSource<SteamContent.CDNAuthToken>();

if (bAborted || !CDNAuthTokens.TryAdd(cdnKey, completion))
{
Expand All @@ -300,7 +300,7 @@ public async Task RequestCDNAuthToken(uint appid, uint depotid, Server server)

DebugLog.WriteLine(nameof(Steam3Session), $"Requesting CDN auth token for {server.Host}");

var cdnAuth = await steamApps.GetCDNAuthToken(appid, depotid, server.Host);
var cdnAuth = await steamContent.GetCDNAuthToken(appid, depotid, server.Host);

Console.WriteLine($"Got CDN auth token for {server.Host} result: {cdnAuth.Result} (expires {cdnAuth.Expiration})");

Expand Down

0 comments on commit 6a0147e

Please sign in to comment.