diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 663f48be..c791ab84 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -29,17 +29,15 @@ static class ContentDownloader private sealed class DepotDownloadInfo { public uint id { get; private set; } - public uint appId { get; private set; } public string installDir { get; private set; } public string contentName { get; private set; } public ulong manifestId { get; private set; } public byte[] depotKey; - public DepotDownloadInfo(uint depotid, uint appId, ulong manifestId, string installDir, string contentName) + public DepotDownloadInfo(uint depotid, ulong manifestId, string installDir, string contentName) { this.id = depotid; - this.appId = appId; this.manifestId = manifestId; this.installDir = installDir; this.contentName = contentName; @@ -421,7 +419,7 @@ static DepotDownloadInfo GetDepotInfo(uint depotId, uint appId, string branch) byte[] depotKey = steam3.DepotKeys[depotId]; - var info = new DepotDownloadInfo( depotId, appId, manifestID, installDir, contentName ); + var info = new DepotDownloadInfo( depotId, manifestID, installDir, contentName ); info.depotKey = depotKey; return info; } @@ -450,16 +448,6 @@ private static List CollectCDNClientsForDepot(DepotDownloadInfo depot { CDNClient c; - if (s.Type == "CDN") - { - // serialize access to steam3 if we are called from AsParallel code - lock (steam3) - { - steam3.RequestCDNAuthToken(depot.appId, s.Host); - s.CDNAuthToken = steam3.CDNAuthTokens[Tuple.Create(depot.appId, s.Host)].Token; - } - } - if ( tries == 0 ) { c = initialClient; @@ -477,8 +465,9 @@ private static List CollectCDNClientsForDepot(DepotDownloadInfo depot catch { Console.WriteLine( "\nFailed to connect to content server {0}. Remaining content servers for depot: {1}.", s, Config.MaxServers - tries - 1 ); - tries++; } + + tries++; } if ( cdnClients.Count == 0 ) diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index b40559db..8af2bbc6 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -32,7 +32,6 @@ public ReadOnlyCollection Licenses public Dictionary AppTickets { get; private set; } public Dictionary AppTokens { get; private set; } public Dictionary DepotKeys { get; private set; } - public Dictionary, SteamApps.CDNAuthTokenCallback> CDNAuthTokens { get; private set; } public Dictionary AppInfo { get; private set; } public Dictionary PackageInfo { get; private set; } @@ -68,7 +67,6 @@ public Steam3Session( SteamUser.LogOnDetails details ) this.AppTickets = new Dictionary(); this.AppTokens = new Dictionary(); this.DepotKeys = new Dictionary(); - this.CDNAuthTokens = new Dictionary, SteamApps.CDNAuthTokenCallback>(); this.AppInfo = new Dictionary(); this.PackageInfo = new Dictionary(); @@ -281,34 +279,6 @@ public void RequestDepotKey(uint depotId, uint appid = 0) } } - public void RequestCDNAuthToken(uint appid, string host) - { - if (CDNAuthTokens.ContainsKey(Tuple.Create(appid, host)) || bAborted) - return; - - Action cbMethod = (cdnAuth, jobId) => - { - Console.WriteLine("Got CDN auth token for {0} result: {1}", host, cdnAuth.Result); - - if (cdnAuth.Result != EResult.OK) - { - Abort(); - return; - } - - CDNAuthTokens[Tuple.Create(appid, host)] = cdnAuth; - }; - - using (var cdnAuthCallback = new JobCallback(cbMethod, callbacks, steamApps.GetCDNAuthToken(appid, host))) - { - do - { - WaitForCallbacks(); - } - while (!cdnAuthCallback.Completed && !bAborted); - } - } - void Connect() { bAborted = false;