From d76a37c7856d7b1a3c47a72ca7032398e3ba56d5 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Wed, 12 Aug 2026 19:55:38 +0200 Subject: [PATCH] Add AdvancedSceneSwitcherVersion vendor request Returns version and commit information --- lib/utils/websocket-api.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/utils/websocket-api.cpp b/lib/utils/websocket-api.cpp index 3d06813a..9e33ec52 100644 --- a/lib/utils/websocket-api.cpp +++ b/lib/utils/websocket-api.cpp @@ -1,6 +1,7 @@ #include "websocket-api.hpp" #include "obs-websocket-api.h" #include "plugin-state-helpers.hpp" +#include "version.h" // Must be after "obs-websocket-api.h" to avoid logging function conflict #include "log-helper.hpp" @@ -15,6 +16,7 @@ static constexpr char VendorName[] = "AdvancedSceneSwitcher"; static constexpr char VendorRequestStart[] = "AdvancedSceneSwitcherStart"; static constexpr char VendorRequestStop[] = "AdvancedSceneSwitcherStop"; static constexpr char VendorRequestStatus[] = "IsAdvancedSceneSwitcherRunning"; +static constexpr char VendorRequestVersion[] = "AdvancedSceneSwitcherVersion"; static obs_websocket_vendor vendor; static void registerWebsocketVendor(); @@ -82,6 +84,12 @@ static void registerWebsocketVendor() obs_data_set_bool(response, "isRunning", PluginIsRunning()); }); + registerWebsocketVendorRequest( + VendorRequestVersion, + [](obs_data_t *, obs_data_t *response, void *) { + obs_data_set_string(response, "version", g_GIT_TAG); + obs_data_set_string(response, "commit", g_GIT_SHA1); + }); } const char *GetWebsocketVendorName()