bebo-dot-dev / m3u-epg-editor

a python m3u / epg optimizer
120 stars 27 forks source link

Introduces local file uri support #5

Closed bebo-dot-dev closed 6 years ago

bebo-dot-dev commented 6 years ago

Introduces local file uri support for https://github.com/jjssoftware/m3u-epg-editor/issues/4

bebo-dot-dev commented 6 years ago

This change introduces local file uri support for the new feature requested in https://github.com/jjssoftware/m3u-epg-editor/issues/4

bebo-dot-dev commented 6 years ago

Hi @haxcop, yes I noticed the vaderstreams change to their m3u a few weeks ago. They've introduced a hash identifier token into the stream urls in their m3u where the hash Id corresponds to user credentials and they've removed the username / password pair from the stream url.

If you look closely at what happens when a request is made to a stream from their m3u since this change, you'll see the response is a 302 redirect to another m3u file that contains final details about the stream (along with another hash identifier). They're clearly trying to improve security with this change.

The problem you've found is that not all systems support following 302 redirects in m3u responses and this will be the cause of the new vaders m3u mechanism not working in telly / plex. In order for it to work the requesting system needs support to follow redirect to the final m3u and also be able to understand that the requested stream is in the final m3u response. This same problem used to exist in kodi too but has now been patched / fixed.

Some good news that I've found since you mentioned the vaders VOD m3u file, is that this file includes stream details for both live TV as well as VOD content and the live TV stream URLs are still in the old format where they contain usernames / passwords in the URL i.e. http://xxx.xxx:80/live/[USERNAME]/[PASSWORD]/64457.ts and I'm guessing this is why you've moved to using this file because it still works for you because there's no inline redirect with these URLs.

I've merged this change to introduce support for local file Uris and also fixed the problem with regex case-sensitivity. This means you should now find that m3u-epg-editor.py now works ok with the vaders VOD m3u..but only vaderstreams will know how long their VOD m3u will stay in existence in this format.