Download all pubfiles in a single call

pull/234/head
js6pak 3 years ago
parent bcbc4e4474
commit 5567b1a7cf
No known key found for this signature in database
GPG Key ID: 3E3CD91EB1AAFB06

@ -354,6 +354,8 @@ namespace DepotDownloader
{ {
var list = steam3.GetPublishedFileDetails(appId, publishedFileIds); var list = steam3.GetPublishedFileDetails(appId, publishedFileIds);
var hcontentFiles = new HashSet<ulong>();
foreach (var details in list) foreach (var details in list)
{ {
if (!string.IsNullOrEmpty(details?.file_url)) if (!string.IsNullOrEmpty(details?.file_url))
@ -362,13 +364,18 @@ namespace DepotDownloader
} }
else if (details?.hcontent_file > 0) else if (details?.hcontent_file > 0)
{ {
await DownloadAppAsync(appId, new List<(uint, ulong)> { (appId, details.hcontent_file) }, DEFAULT_BRANCH, null, null, null, false, true); hcontentFiles.Add(details.hcontent_file);
} }
else else
{ {
Console.WriteLine("Unable to locate manifest ID for published file {0}", details?.publishedfileid); Console.WriteLine("Unable to locate manifest ID for published file {0}", details?.publishedfileid);
} }
} }
if (hcontentFiles.Count > 0)
{
await DownloadAppAsync(appId, hcontentFiles.Select(f => (appId, f)).ToList(), DEFAULT_BRANCH, null, null, null, false, true);
}
} }
public static async Task DownloadUGCAsync(uint appId, ulong ugcId) public static async Task DownloadUGCAsync(uint appId, ulong ugcId)

Loading…
Cancel
Save