diff options
| author | yuuko <yuuko@partyvan.io> | 2026-01-03 14:38:34 -0800 |
|---|---|---|
| committer | ylh <yestin@ylh.io> | 2026-01-03 14:40:16 -0800 |
| commit | 8129ad2f5bd79b8778b30249e89a22ed9f65b402 (patch) | |
| tree | 3c738ed9d988b4c2f789b0309c33d917098a2523 /srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch | |
| parent | 357c7ece8ebe441b78ca9f2f5a0bdd9cac2fa067 (diff) | |
depotdownloader-json: nixpkgs 25.05 (depotdownloader 3.1.0)
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.patch | 34 |
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 + |
