Browse Source

Parse M3U tracks without title

tags/v0.5.0.0
Catherine Galkina 2 years ago
parent
commit
26499d9470
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      src/Text/Playlist/M3U/Reader.hs

+ 3
- 4
src/Text/Playlist/M3U/Reader.hs View File

@@ -73,8 +73,7 @@ commentOrDirective = do
73 73
       directive = do
74 74
         mlen <- (Just . realToFrac <$> signed double) <|> return Nothing -- Parse length.
75 75
         skip (== 44)                                                     -- Skip comma.
76
-        skipSpace
77
-        text <- decodeUtf8 <$> takeWhile1 (not . isEOL)
78
-        skipSpace
79
-        return (Just (Just text, mlen))
76
+        mtext <- (Just . decodeUtf8 <$> takeWhile1 (not . isEOL)) <|> (return Nothing)
77
+        skipLine
78
+        return (Just (mtext, mlen))
80 79
 

Loading…
Cancel
Save