mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Ignore empty lines in M3U files
This commit is contained in:
parent
8c2e4da396
commit
e7202339af
1 changed files with 3 additions and 3 deletions
|
@ -110,9 +110,9 @@ func (s *playlists) parseM3U(ctx context.Context, pls *model.Playlist, baseDir s
|
|||
scanner.Split(scanLines)
|
||||
var mfs model.MediaFiles
|
||||
for scanner.Scan() {
|
||||
path := scanner.Text()
|
||||
// Skip extended info
|
||||
if strings.HasPrefix(path, "#") {
|
||||
path := strings.TrimSpace(scanner.Text())
|
||||
// Skip empty lines and extended info
|
||||
if path == "" || strings.HasPrefix(path, "#") {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(path, "file://") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue