WillinuX-Code / webos-tvheadend

WebOS Client for TVheadend
GNU General Public License v3.0
18 stars 3 forks source link

TVHeadend Authentication #2

Closed WillinuX-Code closed 3 years ago

WillinuX-Code commented 3 years ago

Passing digest authentication to video.src or image.src is not possible, therefore tvheadend provides a "Persistent authentication Code" which needs to be enabled in the users password settings. However this token can not be retrieved through the API with normal user rights. However if the playlist is retrieved in m3u format (#4 ) tvh will attach the authcode automatically to image and stream url (see below example) So its best to use the m3u playlist and not the api to retrieve the channels

#EXTM3U
#EXTINF:-1 logo="http://userver.fritz.box:9981/imagecache/7167?auth=Ps4Lz4D7VbgU-fyB0F6m0T6YIvlw" tvg-id="978ffcc9bede159db867631b28b2ce0a" tvg-chno="1",Das Erste HD
http://userver.fritz.box:9981/stream/channelid/1241288599?auth=Ps4Lz4D7VbgU-fyB0F6m0T6YIvlw&profile=pass
#EXTINF:-1 logo="http://userver.fritz.box:9981/imagecache/7166?auth=Ps4Lz4D7VbgU-fyB0F6m0T6YIvlw" tvg-id="f2ceba520639ad0ffaaf030edc7453ee" tvg-chno="2",ZDF HD
http://userver.fritz.box:9981/stream/channelid/1387974386?auth=Ps4Lz4D7VbgU-fyB0F6m0T6YIvlw&profile=pass