From 410408cb71a6ca10c9e6ad7cdb919a5e404b5b11 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 22 Oct 2014 07:58:13 -0400 Subject: [PATCH] Add support for shared depots (depotfromapp). --- DepotDownloader/ContentDownloader.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 640f0e9f..581a39d6 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -208,6 +208,21 @@ namespace DepotDownloader if (depotChild == KeyValue.Invalid) return INVALID_MANIFEST_ID; + if (depotChild["depotfromapp"] != KeyValue.Invalid) + { + uint otherAppId = (uint)depotChild["depotfromapp"].AsInteger(); + if (otherAppId == appId) + { + // This shouldn't ever happen, but ya never know with Valve. Don't infinite loop. + Console.WriteLine("App {0}, Depot {1} has depotfromapp of {2}!", + appId, depotId, otherAppId); + return INVALID_MANIFEST_ID; + } + + steam3.RequestAppInfo(otherAppId); + return GetSteam3DepotManifest(depotId, otherAppId, branch); + } + var manifests = depotChild["manifests"]; var manifests_encrypted = depotChild["encryptedmanifests"];