mirror of
https://github.com/SteamRE/DepotDownloader.git
synced 2026-10-20 01:46:17 +00:00
Revert 'Added support for CDN content servers'
This commit is contained in:
1 parent
c1c4ef5910
commit
fdba42da77
2 files changed
+4
-45
No files matched your search
@@ -29,17 +29,15 @@ namespace DepotDownloader
|
||||
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 @@ namespace DepotDownloader
|
||||
|
||||
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 @@ namespace DepotDownloader
|
||||
{
|
||||
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 @@ namespace DepotDownloader
|
||||
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 )
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace DepotDownloader
|
||||
public Dictionary<uint, byte[]> AppTickets { get; private set; }
|
||||
public Dictionary<uint, ulong> AppTokens { get; private set; }
|
||||
public Dictionary<uint, byte[]> DepotKeys { get; private set; }
|
||||
public Dictionary<Tuple<uint, string>, SteamApps.CDNAuthTokenCallback> CDNAuthTokens { get; private set; }
|
||||
public Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo> AppInfo { get; private set; }
|
||||
public Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo> PackageInfo { get; private set; }
|
||||
|
||||
@@ -68,7 +67,6 @@ namespace DepotDownloader
|
||||
this.AppTickets = new Dictionary<uint, byte[]>();
|
||||
this.AppTokens = new Dictionary<uint, ulong>();
|
||||
this.DepotKeys = new Dictionary<uint, byte[]>();
|
||||
this.CDNAuthTokens = new Dictionary<Tuple<uint, string>, SteamApps.CDNAuthTokenCallback>();
|
||||
this.AppInfo = new Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo>();
|
||||
this.PackageInfo = new Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo>();
|
||||
|
||||
@@ -281,34 +279,6 @@ namespace DepotDownloader
|
||||
}
|
||||
}
|
||||
|
||||
public void RequestCDNAuthToken(uint appid, string host)
|
||||
{
|
||||
if (CDNAuthTokens.ContainsKey(Tuple.Create(appid, host)) || bAborted)
|
||||
return;
|
||||
|
||||
Action<SteamApps.CDNAuthTokenCallback, JobID> 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<SteamApps.CDNAuthTokenCallback>(cbMethod, callbacks, steamApps.GetCDNAuthToken(appid, host)))
|
||||
{
|
||||
do
|
||||
{
|
||||
WaitForCallbacks();
|
||||
}
|
||||
while (!cdnAuthCallback.Completed && !bAborted);
|
||||
}
|
||||
}
|
||||
|
||||
void Connect()
|
||||
{
|
||||
bAborted = false;
|
||||
|
||||
Reference in new issue
Block a user