From 8cc452c31a695cea05f3da65e468f694d85d8f26 Mon Sep 17 00:00:00 2001 From: Sab44 <64696149+Sab44@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:27:45 +0100 Subject: [PATCH] Add application version to root node of data.json (#2240) * Add version to root node of data.json * Formatting --------- Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com> --- LibreHardwareMonitor/Utilities/HttpServer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LibreHardwareMonitor/Utilities/HttpServer.cs b/LibreHardwareMonitor/Utilities/HttpServer.cs index a21af16..1396580 100644 --- a/LibreHardwareMonitor/Utilities/HttpServer.cs +++ b/LibreHardwareMonitor/Utilities/HttpServer.cs @@ -30,6 +30,8 @@ public class HttpServer private readonly HttpListener _listener; private readonly Node _root; private readonly IElement _rootElement; + private readonly Version _version = typeof(HttpServer).Assembly.GetName().Version; + private Task _listenerTask; private CancellationTokenSource _cts; @@ -523,6 +525,7 @@ public class HttpServer int nodeIndex = 0; json["id"] = nodeIndex++; + json["Version"] = $"{_version.Major}.{_version.Minor}.{_version.Build}"; json["Text"] = "Sensor"; json["Min"] = "Min"; json["Value"] = "Value";