Closed oottppxx closed 5 years ago
Thanks for the PR.
The $ in the regex ensures it only matches the end of the string. Can you provide an example where this isn't the case?
Some streams from particular providers have path elements with dots in it.
E.g., .../foo.bar/stream.m3u8?key=val...
Not sure if the arguments after ? are included in the path (I think they're not, otherwise there'd be more generalised issues); the $ anchoring obviously doesn't prevent matching the initial dot on an unrelated element of the path "foo.bar", making such a stream being erroneously marked as VOD when it isn't.
url.path doesn't include the query string. However you're correct the current regex isn't working as intended (it will match any stream ending .m3u8 instead of just the vod double extensions as intended if the path element has a dot in it). I'll update with your fix, thanks.
Updated in master
The original regex would match the first dot on any part of the URL, which could cause issues with certain IPTV providers. This guarantees the match is only on the last element of the path (file or stream).