diff --git a/EftPatchHelper/EftPatchHelper/Model/PatchInfo.cs b/EftPatchHelper/EftPatchHelper/Model/PatchInfo.cs new file mode 100644 index 0000000..cb23033 --- /dev/null +++ b/EftPatchHelper/EftPatchHelper/Model/PatchInfo.cs @@ -0,0 +1,8 @@ +namespace EftPatchHelper.Model; + +public class PatchInfo +{ + public int SourceClientVersion { get; set; } + public int TargetClientVersion { get; set; } + public List Mirrors { get; set; } +} \ No newline at end of file diff --git a/EftPatchHelper/EftPatchHelper/Tasks/UploadMirrorListTasks.cs b/EftPatchHelper/EftPatchHelper/Tasks/UploadMirrorListTasks.cs index 37897cf..e44f1f1 100644 --- a/EftPatchHelper/EftPatchHelper/Tasks/UploadMirrorListTasks.cs +++ b/EftPatchHelper/EftPatchHelper/Tasks/UploadMirrorListTasks.cs @@ -41,9 +41,14 @@ namespace EftPatchHelper.Tasks public bool CreateMirrorList(FileInfo mirrorListFileInfo) { - List mirrors = _options.MirrorList.Values.ToList(); + var mirrorInfo = new PatchInfo + { + SourceClientVersion = int.Parse(_options.SourceClient.Version), + TargetClientVersion = int.Parse(_options.TargetClient.Version), + Mirrors = _options.MirrorList.Values.ToList() + }; - string json = JsonSerializer.Serialize(mirrors, new JsonSerializerOptions() { WriteIndented = true }); + string json = JsonSerializer.Serialize(mirrorInfo, new JsonSerializerOptions() { WriteIndented = true }); File.WriteAllText(mirrorListFileInfo.FullName, json);