Get Player.OnPlay with playerid=-1 for recorded live tv
#1
Hi,

I am writing an XBMC binding for the openHAB home automation software package. After reading the XBMC JSON RPC API I added some checks to ensure the playerid returned in any Player.OnXXX events was between 0 and 2 (inclusive).

However when I try and play a recorded TV show (using the TVHeadend PVR) I get an OnPlay event as such;

Code:
{"jsonrpc":"2.0","method":"Player.OnPlay","params":{"data":{"item":{"title":"","type":"movie"},"player":{"playerid":-1,"speed":1}},"sender":"xbmc"}}

So the type is coming back as movie, which is a little weird, but I can only guess this is just a default? The bigger problem is the playerid of -1. What does this mean? Is this a bug, or is there a new player type supported in Frodo? Specifically for recorded PVR content?

I have search high and low and can't find any reference anywhere of this happening.

Thanks,
Ben

It should be noted that when plaing a Movie, TV Show or Live TV the playerid comes back as 1 (as expected, i.e. video) with the item.type = movie, episode or channel respectively. Again, all as expected. It is just playing recorded PVR content that has this issue.
Reply
#2
Does anyone know what a playerid=-1 means? It is not a response to any message I have sent, but an asynchronous message arriving on my web socket when I starting playing a 'live tv' recording. Is it an undocumented player type? Or is this a bug (unlikely)?

Any help would be great if anyone has any thoughts?!
Reply
#3
Sounds like a bug. Unfortunately I don't have a PVR setup so I can't really test/reproduce this.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Is there anything I can do to help track this down? Would you like me to log a bug somewhere?
Reply
#5
Noticed another thing with this, 'type' comes back as 'unknown' when I call Player.GetItem and pass playerid=1 (i.e. ignore the -1 coming back in the Player.OnPlay message and use 1).
Reply
#6
Yes recordings haven't been integrated into the JSON-RPC API yet. That's probably also the reason for the playerid being reported as -1.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
Ok - good to know - thanks for letting me know. For now I will just code around it in my openHAB (home automation software) binding and transpose -1 --> 1 and 'unknown' --> 'channel'.

Cheers!
Reply

Logout Mark Read Team Forum Stats Members Help
Get Player.OnPlay with playerid=-1 for recorded live tv0