From 70da480efeec856290d44ac836a1dee5bd7482c4 Mon Sep 17 00:00:00 2001 From: Ryan Kistner Date: Fri, 6 Nov 2020 19:42:59 -0700 Subject: [PATCH] Allow a list of -manifest ids to match -depot --- DepotDownloader/Program.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index bd2006b4..c522c7e4 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -228,16 +228,17 @@ namespace DepotDownloader bool isUGC = false; List depotIdList = GetParameterList( args, "-depot" ); - ulong manifestId = GetParameter( args, "-manifest", ContentDownloader.INVALID_MANIFEST_ID ); - if ( manifestId != ContentDownloader.INVALID_MANIFEST_ID ) + List manifestIdList = GetParameterList( args, "-manifest" ); + if ( manifestIdList.Count > 0 ) { - if ( depotIdList.Count != 1 ) + if ( depotIdList.Count != manifestIdList.Count ) { - Console.WriteLine( "Error: -manifest requires one -depot to be specified" ); + Console.WriteLine( "Error: -manifest requires one id for every -depot specified" ); return 1; } - depotManifestIds.Add( ( depotIdList[0], manifestId ) ); + var zippedDepotManifest = depotIdList.Zip( manifestIdList, ( depotId, manifestId ) => ( depotId, manifestId ) ); + depotManifestIds.AddRange( zippedDepotManifest ); } else {