blob: 0eab99b00c29ee37a03b48c166950ca2738fc4f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|