Skip to content

Commit

Permalink
fix stream title parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Mar 2, 2024
1 parent 6f3c183 commit 381c1e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion m3u/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ParseM3UFromURL(db *sql.DB, m3uURL string, m3uIndex int, maxConcurrency int

if strings.HasPrefix(line, "#EXTINF:") {
currentStream = database.StreamInfo{}
currentStream.Title = strings.TrimSpace(strings.TrimSuffix(strings.TrimPrefix(line, "#EXTINF:-1"), ","))
currentStream.Title = strings.TrimSpace(strings.SplitN(line, ",", 2)[1])

// Define a regular expression to capture key-value pairs
regex := regexp.MustCompile(`(\S+?)="([^"]*?)"`)
Expand Down

0 comments on commit 381c1e7

Please sign in to comment.