-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
For example, if m3u8
file contains carriage return (\r
), something like:
#EXTM3U\r\n#EXT-X-VERSION:3\r\n#EXT-X-TARGETDURATION:4\r\n#EXT-X-MEDIA-SEQUENCE:0\r\nhttps://advert.com/foo.mp4
Here:
Scriptlets/src/scriptlets/m3u-prune.js
Line 310 in 6c3693f
let lines = text.split(/\n\r|\n|\r/); |
when it's "splitted", it adds empty elements to array and it causes that pruning doesn't work.
Example:
'#EXTM3U\r\n#EXT-X-VERSION:3\r\n#EXT-X-TARGETDURATION:4\r\n#EXT-X-MEDIA-SEQUENCE:0\r\nhttps://advert.com/foo.mp4'.split(/\n\r|\n|\r/)
Removing empty elements from array should fixes it.