We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57c7d49 commit 2c5aa79Copy full SHA for 2c5aa79
dashboard/src/api/services/live.js
@@ -126,10 +126,12 @@ class LiveService {
126
127
for (let i = 0; i < lines.length; i++) {
128
const line = lines[i]
129
-
+ // 跳过空行
130
+ if (!line) continue;
131
+
132
if (line.startsWith('#EXTINF:')) {
133
// 解析频道信息 - 修复正则表达式来正确处理属性和频道名称
- const match = line.match(/#EXTINF:(-?\d+),(.*)$/)
134
+ const match = line.match(/^#EXTINF:([-\.\d]+)\s*(.*)$/);
135
if (match) {
136
const duration = match[1]
137
const fullStr = match[2].trim()
@@ -483,4 +485,4 @@ class LiveService {
483
485
// 创建单例实例
484
486
const liveService = new LiveService()
487
-export default liveService
488
+export default liveService
0 commit comments