Hi all,
If within src/input/mpegts/iptv/iptv_auto.c:
Just before: if (!strncmp(data, "#EXTM3U", 7))
We could check if data if JSON type (such as using json-c):
if (json_tokener_parse(data) != NULL)
If it is then convert to M3U similar to jq query:
$ echo "#EXTM3U" && curl -s http://192.168.80.9/lineup.json | jq -r '.[] | "#EXTINF:-1 tvg-chno=\"\(.GuideNumber)\" tvg-name=\"\(.GuideName)\",\(.GuideName)", "\(.URL)?duration=7200"'
#EXTM3U
#EXTINF:-1 tvg-chno="2.1" tvg-name="CBFT-DT",CBFT-DT
http://192.168.80.9:5004/auto/v2.1?duration=7200
#EXTINF:-1 tvg-chno="3.1" tvg-name="WCAX-HD",WCAX-HD
http://192.168.80.9:5004/auto/v3.1?duration=7200
#EXTINF:-1 tvg-chno="3.2" tvg-name="Movies!",Movies!
http://192.168.80.9:5004/auto/v3.2?duration=7200
#EXTINF:-1 tvg-chno="3.3" tvg-name="Circle",Circle
http://192.168.80.9:5004/auto/v3.3?duration=7200
#EXTINF:-1 tvg-chno="3.4" tvg-name="StartTV",StartTV
http://192.168.80.9:5004/auto/v3.4?duration=7200
#EXTINF:-1 tvg-chno="3.5" tvg-name="ION TV",ION TV
http://192.168.80.9:5004/auto/v3.5?duration=7200
#EXTINF:-1 tvg-chno="5.1" tvg-name="WPTZ-HD",WPTZ-HD
http://192.168.80.9:5004/auto/v5.1?duration=7200
#EXTINF:-1 tvg-chno="5.3" tvg-name="Me TV",Me TV
http://192.168.80.9:5004/auto/v5.3?duration=7200
#EXTINF:-1 tvg-chno="6.1" tvg-name="CBMT-DT",CBMT-DT
http://192.168.80.9:5004/auto/v6.1?duration=7200
#EXTINF:-1 tvg-chno="10.1" tvg-name="CFTM-HD",CFTM-HD
http://192.168.80.9:5004/auto/v10.1?duration=7200
#EXTINF:-1 tvg-chno="12.1" tvg-name="CFCF",CFCF
http://192.168.80.9:5004/auto/v12.1?duration=7200
#EXTINF:-1 tvg-chno="15.1" tvg-name="CKMI",CKMI
http://192.168.80.9:5004/auto/v15.1?duration=7200
#EXTINF:-1 tvg-chno="17.1" tvg-name="CIVM-DT",CIVM-DT
http://192.168.80.9:5004/auto/v17.1?duration=7200
#EXTINF:-1 tvg-chno="22.1" tvg-name="WVNY-DT",WVNY-DT
http://192.168.80.9:5004/auto/v22.1?duration=7200
#EXTINF:-1 tvg-chno="22.2" tvg-name="Laff",Laff
http://192.168.80.9:5004/auto/v22.2?duration=7200
#EXTINF:-1 tvg-chno="22.3" tvg-name="Grit",Grit
http://192.168.80.9:5004/auto/v22.3?duration=7200
#EXTINF:-1 tvg-chno="22.4" tvg-name="Quest",Quest
http://192.168.80.9:5004/auto/v22.4?duration=7200
#EXTINF:-1 tvg-chno="24.1" tvg-name="CIVS-HD",CIVS-HD
http://192.168.80.9:5004/auto/v24.1?duration=7200
#EXTINF:-1 tvg-chno="31.1" tvg-name="WNNE-HD",WNNE-HD
http://192.168.80.9:5004/auto/v31.1?duration=7200
#EXTINF:-1 tvg-chno="33.1" tvg-name="VPBS-1",VPBS-1
http://192.168.80.9:5004/auto/v33.1?duration=7200
#EXTINF:-1 tvg-chno="33.2" tvg-name="VPBS-2",VPBS-2
http://192.168.80.9:5004/auto/v33.2?duration=7200
#EXTINF:-1 tvg-chno="33.3" tvg-name="VPBS-3",VPBS-3
http://192.168.80.9:5004/auto/v33.3?duration=7200
#EXTINF:-1 tvg-chno="33.4" tvg-name="VPBS-4",VPBS-4
http://192.168.80.9:5004/auto/v33.4?duration=7200
#EXTINF:-1 tvg-chno="35.1" tvg-name="CFJP-DT",CFJP-DT
http://192.168.80.9:5004/auto/v35.1?duration=7200
#EXTINF:-1 tvg-chno="44.1" tvg-name="WFFF-DT",WFFF-DT
http://192.168.80.9:5004/auto/v44.1?duration=7200
#EXTINF:-1 tvg-chno="44.2" tvg-name="CourtTV",CourtTV
http://192.168.80.9:5004/auto/v44.2?duration=7200
#EXTINF:-1 tvg-chno="44.3" tvg-name="Bounce",Bounce
http://192.168.80.9:5004/auto/v44.3?duration=7200
#EXTINF:-1 tvg-chno="44.4" tvg-name="Antenna",Antenna
http://192.168.80.9:5004/auto/v44.4?duration=7200
#EXTINF:-1 tvg-chno="47.1" tvg-name="CFHD-DT",CFHD-DT
http://192.168.80.9:5004/auto/v47.1?duration=7200
#EXTINF:-1 tvg-chno="57.1" tvg-name="MLPBSHD",MLPBSHD
http://192.168.80.9:5004/auto/v57.1?duration=7200
#EXTINF:-1 tvg-chno="57.2" tvg-name="NHK-WOR",NHK-WOR
http://192.168.80.9:5004/auto/v57.2?duration=7200
#EXTINF:-1 tvg-chno="57.3" tvg-name="MLKIDS",MLKIDS
http://192.168.80.9:5004/auto/v57.3?duration=7200
#EXTINF:-1 tvg-chno="62.1" tvg-name="CJNT",CJNT
http://192.168.80.9:5004/auto/v62.1?duration=7200