Closed thaytan closed 3 years ago
The problem seems to be related to how is_master_playlist_tag_line()
handles empty lines. Parsing stops at the first blank line, so as long as the first master playlist tag appears before a blank line, the file will be correctly detected as a master playlist.
This fix makes it work for me. I don't know if it's correct - I've never used nom before.
Nice find! Looks like it also fails when there's whitespace before the first line, which could also be something to fix maybe. Your fix looks good though, just merged it 👍
https://tools.ietf.org/html/rfc8216#section-4.3.1.1 - The EXTM3U tag MUST be the first line of every Media Playlist and every Master Playlist.
I found a playlist that is mistakenly parsed as a media playlist instead of a master playlist. It turns out a blank line after the initial
#EXTM3U
tag is the trigger.e.g.
will be parsed incorrectly. Removing the blank line makes it parse correctly.