Use the real Steam build id for private branches
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,12 +68,18 @@ public static class SteamDownloader
|
||||
if (priv.Result != EResult.OK) { log($"Steam would not list the files of '{pb.Name}' ({priv.Result})."); continue; }
|
||||
var selection = SelectDepots(depots, priv.DepotSection, pb.Name);
|
||||
if (selection.Count == 0) continue;
|
||||
list.Add(new BranchInfo(pb.Name, PrivateMarker(selection), true, ""));
|
||||
list.Add(new BranchInfo(pb.Name, PrivateBuildId(priv.DepotSection, pb.Name) ?? PrivateMarker(selection), true, ""));
|
||||
}
|
||||
|
||||
return list.OrderBy(b => b.Name == "public" ? 0 : 1).ThenBy(b => b.Name).ToList();
|
||||
}
|
||||
|
||||
static string? PrivateBuildId(KeyValue? section, string branch)
|
||||
{
|
||||
var id = section?["branches"][branch]["buildid"].Value;
|
||||
return string.IsNullOrEmpty(id) ? null : id;
|
||||
}
|
||||
|
||||
static string PrivateMarker(IEnumerable<(uint DepotId, ulong ManifestId)> depots)
|
||||
{
|
||||
var text = string.Join(";", depots.OrderBy(d => d.DepotId).Select(d => $"{d.DepotId}:{d.ManifestId}"));
|
||||
@@ -168,7 +174,7 @@ public static class SteamDownloader
|
||||
plans.Add(new DepotPlan(depotId, manifestId, keyReply.DepotKey));
|
||||
}
|
||||
if (plans.Count == 0) throw new InvalidOperationException("Steam listed no downloadable files for this branch.");
|
||||
if (buildId.Length == 0) buildId = PrivateMarker(plans.Select(p => (p.DepotId, p.ManifestId)));
|
||||
if (buildId.Length == 0) buildId = PrivateBuildId(privateDepots, branch) ?? PrivateMarker(plans.Select(p => (p.DepotId, p.ManifestId)));
|
||||
|
||||
var statePath = Path.Combine(stateDir, "state.json");
|
||||
var state = new InstallState();
|
||||
|
||||
Reference in New Issue
Block a user