From 2c5aa79b5827f0fc58390c3b4f6131f8a3d5bb7c Mon Sep 17 00:00:00 2001 From: khzhg <76115172+khzhg@users.noreply.github.com> Date: Fri, 3 Oct 2025 14:13:04 +0800 Subject: [PATCH 1/3] Update live.js --- dashboard/src/api/services/live.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dashboard/src/api/services/live.js b/dashboard/src/api/services/live.js index 2fa089a..5dd5e20 100644 --- a/dashboard/src/api/services/live.js +++ b/dashboard/src/api/services/live.js @@ -126,10 +126,12 @@ class LiveService { for (let i = 0; i < lines.length; i++) { const line = lines[i] - + // 跳过空行 + if (!line) continue; + if (line.startsWith('#EXTINF:')) { // 解析频道信息 - 修复正则表达式来正确处理属性和频道名称 - const match = line.match(/#EXTINF:(-?\d+),(.*)$/) + const match = line.match(/^#EXTINF:([-\.\d]+)\s*(.*)$/); if (match) { const duration = match[1] const fullStr = match[2].trim() @@ -483,4 +485,4 @@ class LiveService { // 创建单例实例 const liveService = new LiveService() -export default liveService \ No newline at end of file +export default liveService From 4ed31bbbf8ae0bba02f7dd884ea17b347c66cf67 Mon Sep 17 00:00:00 2001 From: khzhg <76115172+khzhg@users.noreply.github.com> Date: Fri, 3 Oct 2025 14:58:09 +0800 Subject: [PATCH 2/3] Update Live.vue --- dashboard/src/views/Live.vue | 42 ++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/dashboard/src/views/Live.vue b/dashboard/src/views/Live.vue index e9e6d44..6d5ba1f 100644 --- a/dashboard/src/views/Live.vue +++ b/dashboard/src/views/Live.vue @@ -220,7 +220,8 @@