Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update live.js
  • Loading branch information
khzhg authored Oct 3, 2025
commit 2c5aa79b5827f0fc58390c3b4f6131f8a3d5bb7c
8 changes: 5 additions & 3 deletions dashboard/src/api/services/live.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -483,4 +485,4 @@ class LiveService {
// 创建单例实例
const liveService = new LiveService()

export default liveService
export default liveService