automatic m3u playlist creation
Added by Alexander M about 6 years ago
Since I was tired of making an .m3u playlist for SmartIP TV I automated it. A basic PHP script pulling information from the TVHeadEnd API do the trick.
I have a question.
A playable stream would be:
#EXTINF:0,1 : channel 1
http://1.2.3.4:9981/stream/service/6a62c0103a229ae258116e4001ef21c2
#EXTINF:0,2 : channel 2
http://1.2.3.4:9981/stream/service/d706ad740d30e563729401be34422c96
#EXTINF:0,4 : channel 4
http://1.2.3.4:9981/stream/channel/a8353bae72daf70611b34418ae586c9b
This is information what the API provides, so automatically create a playlist is doable. But when I play a stream within de TVHeadEnd GUI I get the URL shown below:
#EXTINF:0,3 : channel 3
http://1.2.3.4:9981/stream/channel/a8353bae72daf70611b34418ae586c9b?ticket=fc7a70e87e5e84c105a54d3f518ea23fb9197fee
This url (mention: ?ticket) provides EPG information as well! I can't find the ?ticket= information within the API so I can use it for my automation. Does anyone has any suggestions how to use the JSON output from the API to get the information I'm looking for?
Replies (1)
RE: automatic m3u playlist creation - Added by Joe User about 6 years ago
The ticket is a short term token (5min???) which allows you to connect without a username/password.
It is not a real secure solution, but with your script, you can insert a username and password into the http request.
http://USER:[email protected]:9981/stream/service/6a62c0103a229ae258116e4001ef21c2