diff --git a/DepotDownloader/DepotDownloader.csproj b/DepotDownloader/DepotDownloader.csproj
index cb9395d..99dbf8f 100644
--- a/DepotDownloader/DepotDownloader.csproj
+++ b/DepotDownloader/DepotDownloader.csproj
@@ -5,7 +5,7 @@
false
-
-
+
+
\ No newline at end of file
diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs
index a88944e..ec16269 100644
--- a/DepotDownloader/Steam3Session.cs
+++ b/DepotDownloader/Steam3Session.cs
@@ -1,5 +1,5 @@
using SteamKit2;
-using SteamKit2.Unified.Internal;
+using SteamKit2.Internal;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -33,6 +33,7 @@ namespace DepotDownloader
public Dictionary AppTickets { get; private set; }
public Dictionary AppTokens { get; private set; }
+ public Dictionary PackageTokens { get; private set; }
public Dictionary DepotKeys { get; private set; }
public ConcurrentDictionary> CDNAuthTokens { get; private set; }
public Dictionary AppInfo { get; private set; }
@@ -82,6 +83,7 @@ namespace DepotDownloader
this.AppTickets = new Dictionary();
this.AppTokens = new Dictionary();
+ this.PackageTokens = new Dictionary();
this.DepotKeys = new Dictionary();
this.CDNAuthTokens = new ConcurrentDictionary>();
this.AppInfo = new Dictionary();
@@ -236,9 +238,24 @@ namespace DepotDownloader
}
};
+ var packageRequests = new List();
+
+ foreach ( var package in packages )
+ {
+ var request = new SteamApps.PICSRequest( package );
+
+ if ( PackageTokens.TryGetValue( package, out var token ) )
+ {
+ request.AccessToken = token;
+ request.Public = false;
+ }
+
+ packageRequests.Add( request );
+ }
+
WaitUntilCallback( () =>
{
- callbacks.Subscribe( steamApps.PICSGetProductInfo( new List(), packages ), cbMethod );
+ callbacks.Subscribe( steamApps.PICSGetProductInfo( new List(), packageRequests ), cbMethod );
}, () => { return completed; } );
}
@@ -627,6 +644,14 @@ namespace DepotDownloader
Console.WriteLine( "Got {0} licenses for account!", licenseList.LicenseList.Count );
Licenses = licenseList.LicenseList;
+
+ foreach ( var license in licenseList.LicenseList )
+ {
+ if ( license.AccessToken > 0 )
+ {
+ PackageTokens.Add( license.PackageID, license.AccessToken );
+ }
+ }
}
private void UpdateMachineAuthCallback( SteamUser.UpdateMachineAuthCallback machineAuth )