From 6da894d237f12322e951e45db5578fad2b0b15a3 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 2 Nov 2025 10:45:54 -0500 Subject: [PATCH] Add messaging for unsupported Workshop file types --- DepotDownloader/ContentDownloader.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 0f0ef2a6..a59a69fb 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -4,6 +4,7 @@ using System; using System.Buffers; using System.Collections.Concurrent; +using System.Collections.Frozen; using System.Collections.Generic; using System.IO; using System.Linq; @@ -35,6 +36,16 @@ namespace DepotDownloader private const string CONFIG_DIR = ".DepotDownloader"; private static readonly string STAGING_DIR = Path.Combine(CONFIG_DIR, "staging"); + private static readonly FrozenSet SupportedWorkshopFileTypes = FrozenSet.ToFrozenSet(new[] + { + EWorkshopFileType.Community, + EWorkshopFileType.Art, + EWorkshopFileType.Screenshot, + EWorkshopFileType.Merch, + EWorkshopFileType.IntegratedGuide, + EWorkshopFileType.ControllerBinding, + }); + private sealed class DepotDownloadInfo( uint depotid, uint appId, ulong manifestId, string branch, string installDir, byte[] depotKey) @@ -337,15 +348,16 @@ namespace DepotDownloader private static async Task ProcessPublishedFileAsync(uint appId, ulong publishedFileId, List> fileUrls, List contentFileIds) { var details = await steam3.GetPublishedFileDetails(appId, publishedFileId); + var fileType = (EWorkshopFileType)details.file_type; - if (details.file_type == (uint)EWorkshopFileType.Collection) + if (fileType == EWorkshopFileType.Collection) { foreach (var child in details.children) { await ProcessPublishedFileAsync(appId, child.publishedfileid, fileUrls, contentFileIds); } } - else + else if (SupportedWorkshopFileTypes.Contains(fileType)) { if (!string.IsNullOrEmpty(details?.file_url)) { @@ -360,6 +372,10 @@ namespace DepotDownloader Console.WriteLine("Unable to locate manifest ID for published file {0}", publishedFileId); } } + else + { + Console.WriteLine("Published file {0} has unsupported file type {1}. Skipping file", publishedFileId, fileType); + } } public static async Task DownloadPubfileAsync(uint appId, ulong publishedFileId)