kodi-pvr / pvr.iptvsimple

IPTV Simple client for Kodi PVR
GNU General Public License v2.0
761 stars 370 forks source link

Adding a header for use in the properties of the inputstream adaptive addon (ISA) #871

Open werimail opened 2 days ago

werimail commented 2 days ago

In order to play streams correctly, it is necessary to add the following headersto ISA properties::

inputstream.adaptive.manifest_headers inputstream.adaptive.stream_headers

as shown here:

#EXTINF:0, stream test
#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.stream_headers=User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
#KODIPROP:inputstream.adaptive.manifest_headers=User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
http://88.212.7.10/live/test_ctsport_25p/playlist.m3u8|User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0

Maybe could also be an idea to have a PVR setting that allows to set or enable/disable user agents.

Thanks and greetings Weri

phunkyfish commented 2 days ago

There is a setting for iptvsimple to set a user agent for all streams.

The props you are setting are ISA specific so no built in support for those in iptvsimple.

CastagnaIT commented 1 day ago

now i have no idea how the PVR code works but yes there is a advanced PVR setting for user-agent this is a good thing, the thing to check is if that setting value is propagated to ISA props, maybe from here(?):

https://github.com/kodi-pvr/pvr.iptvsimple/blob/847750a3d3dae26218adafe2dcd18fdac2dfd358/src/iptvsimple/utilities/StreamUtils.cpp#L86-L102

a good pratice is also set user agent to inputstream.adaptive.manifest_headers that is currently missing form code above it needless to say, without it will make some providers unusable