From b74eb252e39de68745b404ab2cbf6b8a1e5c9d81 Mon Sep 17 00:00:00 2001
From: HenryDu8133 <813367384@qq.com>
Date: Sun, 16 Aug 2026 11:40:47 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E5=90=8E=E7=AB=AF=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E8=A7=A3=E6=9E=90=E8=BF=9C=E7=A8=8B=20Gitea=20?=
=?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7=E7=9A=84=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E5=B9=B6=E5=B1=95=E7=A4=BA=E5=9C=A8=E5=89=8D=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CloudServer/public/index.html | 16 ++++++++++++++++
CloudServer/server.js | 17 +++++++++++++++++
install_station_broadcast.lua | 8 --------
station_broadcast.lua | 2 +-
4 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/CloudServer/public/index.html b/CloudServer/public/index.html
index ad6377e..2e9a3f7 100644
--- a/CloudServer/public/index.html
+++ b/CloudServer/public/index.html
@@ -1711,8 +1711,11 @@
const localVersion = info?.localVersion || '未知';
const targetVersion = info?.targetVersion || '未发布';
const publishedAt = info?.publishedAt ? new Date(info.publishedAt).toLocaleString() : '未发布';
+ const remoteVersionHtml = info?.remoteVersion ? `
Gitea最新:${info.remoteVersion}
` : '';
+
el.innerHTML = `
服务器脚本:${localVersion}
+ ${remoteVersionHtml}
已发布版本:${targetVersion}
发布时间:${publishedAt}
`;
@@ -1723,6 +1726,19 @@
const res = await fetch('/api/station-update');
const data = await res.json();
currentStationUpdate = data;
+
+ try {
+ const remoteRes = await fetch('/api/remote-version');
+ const remoteData = await remoteRes.json();
+ if (remoteData.success) {
+ data.remoteVersion = remoteData.version;
+ } else {
+ data.remoteVersion = '解析失败';
+ }
+ } catch (e) {
+ data.remoteVersion = '请求失败';
+ }
+
renderStationUpdate(data);
} catch (e) {
document.getElementById('current-version').textContent = 'Error';
diff --git a/CloudServer/server.js b/CloudServer/server.js
index 0445dfa..d213b87 100644
--- a/CloudServer/server.js
+++ b/CloudServer/server.js
@@ -2372,6 +2372,23 @@ function convertToDfpwm(filePath) {
}
// Routes
+app.get('/api/remote-version', async (req, res) => {
+ try {
+ const response = await fetch('https://gitea.fse-media.group/Henry_Du/CC-StationBroadcast/raw/branch/main/station_broadcast.lua');
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
+ const text = await response.text();
+ const match = text.match(/local\s+APP_VERSION_TEXT\s*=\s*["']([^"']+)["']/);
+ if (match) {
+ res.json({ success: true, version: String(match[1]).trim() });
+ } else {
+ res.json({ success: false, message: 'Version match failed' });
+ }
+ } catch (e) {
+ log('ERROR', `Failed to fetch remote version: ${e.message}`);
+ res.status(500).json({ success: false, message: e.message });
+ }
+});
+
app.get('/api/version', (req, res) => {
res.json({ version: audioVersion });
});
diff --git a/install_station_broadcast.lua b/install_station_broadcast.lua
index c3edd51..ddbb45d 100644
--- a/install_station_broadcast.lua
+++ b/install_station_broadcast.lua
@@ -1,11 +1,3 @@
---[[
-Author: HenryDu8133 813367384@qq.com
-Date: 2026-05-31 00:12:30
-LastEditors: HenryDu8133 813367384@qq.com
-LastEditTime: 2026-08-16 11:28:02
-FilePath: \StationBroadcastDisplayCN\install_station_broadcast.lua
-Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
---]]
local STATION_BROADCAST_URL = "https://gitea.fse-media.group/Henry_Du/CC-StationBroadcast/raw/branch/main/station_broadcast.lua"
local UPDATE_SCRIPT_URL = "https://gitea.fse-media.group/Henry_Du/CC-StationBroadcast/raw/branch/main/update_station_broadcast.lua"
diff --git a/station_broadcast.lua b/station_broadcast.lua
index a7f2234..a9f7ec6 100644
--- a/station_broadcast.lua
+++ b/station_broadcast.lua
@@ -1,6 +1,6 @@
-- 1. Configuration & Constants
-local APP_VERSION_TEXT = "v1.0.62"
+local APP_VERSION_TEXT = "v1.0.63"
local CONFIG = {
CLOUD_URL = "ws://stabadmin.fse-media.group",