Question about PVR Channels API
#1
Hi all,

I wonder if it is possible to query the pvr information, like channels and peg from my addon?

If it is, can you please share a code example of how to get a list of channels with information like: channel name, URL, icon etc.

... after searching, I managed to find the channels, but how do I get the URL that it runs, can someone someone assist?


Here is my code:

ret = json.loads(xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id": 1, "method": "PVR.GetChannelGroups", "params":{"channeltype":"tv"} }'))
channelgroups = ret['result']['channelgroups']
for channelgroup in channelgroups:
#Get Channels
ret = json.loads(xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id": 1, "method": "PVR.GetChannels", "params":{"channelgroupid" : ' + str(channelgroup['channelgroupid']) + '} }'))
channels = ret['result']['channels']
for channel in channels:
#Get Channel Details
ret = json.loads(xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id": 1, "method": "PVR.GetChannelDetails", "params":{"channelid" : ' + str(channel['channelid']) + '} }'))
utils.write_log('service', str(ret))Confused
Reply
#2
Team, sorry for nagging .... Can someone try to answer or point me to the right person/forum?

Thx,
Yohay
Reply
#3
(2017-03-21, 11:38)ykamchi Wrote: Can someone try to answer or point me to the right person/forum?
Right forum for that question would be the JSON-RPC development forum => http://forum.kodi.tv/forumdisplay.php?fid=174

Also note that there is an PVR addon development forum => http://forum.kodi.tv/forumdisplay.php?fid=136
Reply

Logout Mark Read Team Forum Stats Members Help
Question about PVR Channels API0