Add -force-depot command line parameter to force attempted download of a particular depot in an app.

This allows UGC depots to be downloaded, as they are not listed in the PICS configuration.
pull/8/head
Netshroud 11 years ago
parent 6ae2c37c2a
commit 0b722996b5

@ -320,7 +320,7 @@ namespace DepotDownloader
steam3.Disconnect();
}
public static void DownloadApp(uint appId, uint depotId, string branch)
public static void DownloadApp(uint appId, uint depotId, string branch, bool forceDepot = false)
{
if(steam3 != null)
steam3.RequestAppInfo(appId);
@ -335,6 +335,13 @@ namespace DepotDownloader
var depotIDs = new List<uint>();
KeyValue depots = GetSteam3AppSection(appId, EAppInfoSection.Depots);
if (forceDepot)
{
depotIDs.Add(depotId);
}
else
{
if (depots != null)
{
foreach (var depotSection in depots.Children)
@ -363,7 +370,6 @@ namespace DepotDownloader
depotIDs.Add(id);
}
}
if (depotIDs == null || (depotIDs.Count == 0 && depotId == INVALID_DEPOT_ID))
{
Console.WriteLine("Couldn't find any depots to download for app {0}", appId);
@ -379,6 +385,7 @@ namespace DepotDownloader
Console.WriteLine();
return;
}
}
var infos = new List<DepotDownloadInfo>();

@ -93,6 +93,7 @@ namespace DepotDownloader
ContentDownloader.Config.MaxServers = GetParameter<int>(args, "-max-servers", 8);
ContentDownloader.Config.MaxDownloads = GetParameter<int>(args, "-max-downloads", 4);
string branch = GetParameter<string>(args, "-branch") ?? GetParameter<string>(args, "-beta") ?? "Public";
var forceDepot = HasParameter(args, "-force-depot");
ContentDownloader.Config.MaxServers = Math.Max(ContentDownloader.Config.MaxServers, ContentDownloader.Config.MaxDownloads);
@ -108,7 +109,7 @@ namespace DepotDownloader
}
ContentDownloader.InitializeSteam3(username, password);
ContentDownloader.DownloadApp(appId, depotId, branch);
ContentDownloader.DownloadApp(appId, depotId, branch, forceDepot);
ContentDownloader.ShutdownSteam3();
}

Loading…
Cancel
Save