kim-company / kim_hls

M3U8 marshaler and unmarshaler. Playlist tracker
Apache License 2.0
2 stars 6 forks source link

Fix bug when master playlist has EXT-X-MEDIA-SEQUENCE tag #7

Closed alexandremcosta closed 11 months ago

alexandremcosta commented 11 months ago

Right now, marshaling Master playlists fails if the file contains EXT-X-MEDIA-SEQUENCE. The reason is that we check tags with String.starts_with?/2, which returns true for master EXT-X-MEDIA tag.

This PR implements stricter tags check with:

line == prefix or String.starts_with?(line, prefix <> ":")
alexandremcosta commented 11 months ago

Actually, I just realized it makes no sense to do that...