Channel Id from ListItem ?
#1
Hi Guys
from ListItem it is possible get the channel Id ?
for example with this request in json it is possible get the Name of channel, plot, icon and so on

{"jsonrpc":"2.0","id":1,"method":"XBMC.GetInfoLabels","params": {"labels":["Container(id).ListitemNoWrap.(id).plot"]}}

but it is not possible the channel id.
There is a json api for obtain the channel id ?
Thanks in advance
Reply
#2
Can't anyone help me?
My goal is to get from live tv, channel list screen,
the channel id focused in json or python
Reply
#3
I was wondering why you asked for XBMC.GetInfoLabels. If you only want to receive a list of channels you should use PVR.GetChannels. This will also provide channelid as a result.

Edit:
The command should look like this: {"jsonrpc":"2.0","id":1,"method":"PVR.GetChannels","params": {"channelgroupid":"alltv","properties": ["channel"]}}
As result you'll get a list of channels with channel, channelid and label.
Reply
#4
Ok. Sorry for the unclear question.
I try to explain in detail what I am trying to do
In Live Tv from this screen, I would like to have the channel id of the tv channel that is highlighted.

Image

This would allow me to call the command with channel id in json

{'jsonrpc': '2.0', 'id': 1, 'method': 'PVR.GetChannelDetails', 'params': {'channelid': XXXX, 'properties': ['channeltype','channel','broadcastnow',"broadcastnext','uniqueid','icon','channelnumber','clientid']}}

with the Brodcastnow and Brodcastnext I would have all the information and all the posters to edit the right side as I like the screenshot above.
Reply
#5
Ok, understood now. I never used this way to read content from the UI. Possibly you can just read the channel name and number and search for a match in the complete channel list (what I posted above). This would allow you to find the channel id for the given name and number.
Reply
#6
I tried with channel name (label) and channel number it seems to work

{"id": 1,"jsonrpc": "2.0","method": "PVR.GetChannels","params": {"properties": ["broadcastnext","channelnumber"],"channelgroupid": xxxx}}
Reply
#7
(2022-04-10, 08:07)Datalife Wrote: I tried with channel name (label) and channel number it seems to work
Great to hear this works for you now. Smile
Reply
#8
Hello, I want to play the specified channel. What JSON should I use
Reply
#9
(2022-04-11, 17:17)Buschel Wrote:
(2022-04-10, 08:07)Datalife Wrote: I tried with channel name (label) and channel number it seems to work
Great to hear this works for you now. Smile
Thank you very much
Reply

Logout Mark Read Team Forum Stats Members Help
Channel Id from ListItem ?0