aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch
diff options
context:
space:
mode:
Diffstat (limited to 'srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch')
-rw-r--r--srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch b/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch
new file mode 100644
index 0000000..0eab99b
--- /dev/null
+++ b/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch
@@ -0,0 +1,34 @@
+From f2395dfdff8d051ae3982daab6293b85c88a9666 Mon Sep 17 00:00:00 2001
+From: yuuko <yuuko@partyvan.io>
+Date: Sat, 3 Jan 2026 14:31:25 -0800
+Subject: [PATCH] ContentDownloader: save manifest as json also
+
+---
+ DepotDownloader/ContentDownloader.cs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs
+index caa50eba..e85c0f2d 100644
+--- a/DepotDownloader/ContentDownloader.cs
++++ b/DepotDownloader/ContentDownloader.cs
+@@ -8,6 +8,8 @@ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using System.Net;
++using System.Text;
++using System.Text.Json;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using SteamKit2;
+@@ -1386,6 +1388,8 @@ namespace DepotDownloader
+ var sha1Hash = Convert.ToHexString(file.FileHash).ToLower();
+ sw.WriteLine($"{file.TotalSize,14:d} {file.Chunks.Count,6:d} {sha1Hash} {(int)file.Flags,5:x} {file.FileName}");
+ }
++ var jsonBytes = new UTF8Encoding(true).GetBytes(JsonSerializer.Serialize(manifest));
++ File.Open(txtManifest.Replace(".txt", ".json"), FileMode.Create).Write(jsonBytes, 0, jsonBytes.Length);
+ }
+ }
+ }
+--
+2.51.0
+