Skip to content

Add LiveTV support to Player interface in JSON Player #626

wants to merge 13 commits into from

2 participants


Add proper LiveTV support to the Player.X methods of the JSON-RPC API.

Some changes include:
GoNext/GoPrevious act as channel up/down
GoTo(position) switches to channel number position
GetItem integration, exposes Epg data, so getting genre, plot, ... work, includes new starttime, endtime and channel properties
Added a new "islive" property on the Player which is true for live tv and false otherwise
Send OnStop and OnStart to notify client about channel switch (sounds odd, but it's the same as a playlist does when it switches to another item)

Most of these are implemented in a backwards compatible manner. So clients which don't know PVR would still get some/most of the new "features". So for one there is no need to add some special "channel up" handling as it's the "old" Player.GoNext etc.

What's currently missing is the OnStop & OnStart notification when one program is finished and the other starts. So this needs to be added before it can be merged (will add this in the upcomming day(s)).


About the announcement, which we've yesterday also talked about on IRC. I agree that not all code which is needed for the JSON API should be in the Epg/Pvr code. But, I do think the announcements are a required part of the code. As the announcements are not only for JSON, but are also being used for the Python add-on API. So my guess would be they still should be integrated where needed, the same as NotifyObserver is being called where the event needs to be triggered. That's also how it's currently implemented (I know, not always a good guideline). Application.PlayFile sends the OnPlay announcement (I guess, didn't look it up right now) and it isn't implemented as an observer for a notification which then sends out the announcement.

Please let me know what you think about it.


Now that PVR support has been merged into mainline XBMC, every pull request must be sent as a pull request to mainline XBMC too:

That's why I am closing this one. Sorry for the trouble.

@opdenkamp opdenkamp closed this Sep 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.