Expose PVR database via JSON
#1
Hey, I wrote a pretty neat add-on which fetches tumbnails for PVR entries. It fills the "sIconPath" of the entries via direct db access. This is obviously an ugly hack which can cause problems, but there is no other way to achive it. I have lots of ideas which would improve the user experience of the whole PVR section, but this needs support from the core to work properly.

If there would be a way to manipulate the DB, a lot of features could be implemented. Some examples for German TV broadcasters:

Thumbnails and Fanart support
TV broadcasters supply a nice web EPG with thumbnails for every show. It would be possible to scrape them once a day (2-4 get requests should suffice). Fanart could be supplied like this too from the VOD platforms of the broadcasters. This screenshot is a proof of concept: http://i.imgur.com/3JRocX3.png

Web/add-on connectivity
EPG entries could provide a direct access to VOD sources like trailers. German broadcasters host around 70% of the TV program online, so that could be linked directly from the EPG. I have an add-on which enables the user to do that, but involves a suboptimal context menu - direct support would be nice. Screenshots: http://imgur.com/t8Q8yU7, http://imgur.com/e6zlbhc, http://imgur.com/M5YY7Gt

Improving OTA data
The EPG data from the TV stations here in germany is pretty basic. The possibilities of the DVB SI spec are not even remotely used. With access to the DB, it would be possible to extract some metadata. We could flag movies and series; add episode numbers, part numbers, release year, movie director and other informations. This would make skin views like 'list all movies' possible and improves the search for more episodes.

Adding more EPG information
The websites of the major broadcasters feature additional informations for shows/individual episodes. This could be incoperated into the EPG to provide more information. External sources like an IMDB link to a previous marked movie would be possible.


To implement those features, I need access to the EPG database. A methode like "PVR.GetBroadcasts" where it is possible to submit data would be nice. The DB would need some more columns (e.g. for the add-on path), which would have to show up as listitem properties.

I think that this would be a very interesting feature for skinners and add-on devs.
Reply
#2
+1

(2016-07-05, 17:38)membrane Wrote: It improves the user experience quite a bit IMHO.

spending more attention to membranes posts improves the kodi experience for general IMHO.
Reply
#3
isn't that a backend job?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
There was a PR recently which made auto thumbnails for recordings, i'm not sure it was accepted though.
Reply
#5
(2016-07-11, 11:33)nickr Wrote: isn't that a backend job?

In a perfect world, yes. But the EPG metadata of German broadcasters is very limited, leaving many features of the DVB-* spec unused.

My add-on fetches the thumbnail urls from HbbTV portals and combines them with the already present EPG entries. This mimics the actual HbbTV EPGs of the channels, while keeping all the benefits of the DVB-* EPG - the best of both worlds. This is - like HbbTV - job of the frontend.

An other add-on allows the user to rewatch past TV shows by selecting the EPG entry via context menu. This is far from optimal, because the user has no indicator if there is a video available.


XBMC was amongst the first mediacenters which allowed to watch online content (of German TV broadcasters). The new trend is to "fuse" Live TV and web content - this is a new area for broadcasters and device manufactures. Kodi could be "leading" once again in this respect.

HbbTV 2.0 will introduce some interesting features: Synced audio tracks for Live TV (like an original track or sport events without commentator), additional camera tracks and various subtitles. This would be difficult to realise without support from the core.


What i'd like to see:
- Access to the EPG DB via JSON
- Additional DB columns (path to channel add-on, path to video on demand, path to videos of TV show, path to trailer)
- Persistent EPG entries (the client of TVHeadend overwrites the whole EPG entry while updating, not just fields that changed)
- Skin support for web/add-on content

Edit: I will try to outsource these features in a seperate script. This will require skin support and results in a higher workload, but might be a good testbed for my ideas.
Reply
#6
(2016-07-11, 12:48)membrane Wrote: My add-on fetches the thumbnail urls from HbbTV portals and combines them with the already present EPG entries. This mimics the actual HbbTV EPGs of the channels, while keeping all the benefits of the DVB-* EPG - the best of both worlds. This is - like HbbTV - job of the frontend.

An other add-on allows the user to rewatch past TV shows by selecting the EPG entry via context menu. This is far from optimal, because the user has no indicator if there is a video available.

XBMC was amongst the first mediacenters which allowed to watch online content (of German TV broadcasters). The new trend is to "fuse" Live TV and web content - this is a new area for broadcasters and device manufactures. Kodi could be "leading" once again in this respect.

HbbTV 2.0 will introduce some interesting features: Synced audio tracks for Live TV (like an original track or sport events without commentator), additional camera tracks and various subtitles. This would be difficult to realise without support from the core.


What i'd like to see:
- Access to the EPG DB via JSON
- Additional DB columns (path to channel add-on, path to video on demand, path to videos of TV show, path to trailer)
- Persistent EPG entries (the client of TVHeadend overwrites the whole EPG entry while updating, not just fields that changed)
- Skin support for web/add-on content

Edit: I will try to outsource these features in a seperate script. This will require skin support and results in a higher workload, but might be a good testbed for my ideas.
Was not one of the PVR developers from Team Kodi, Alwin Esch (a.k.a. alwinus), working on trying to integrate a HTML engine into Kodi?

http://esmasol.de/open-source/kodi-add-o...b-browser/

He wrote here on his blog about integrating CEF (Chromium Embedded Framework) to enable web add-ons and more in the future.

He even mentions the possibility to bring HbbTV support to Kodi and mentions it for use with web content used in TV channels.

Unfortuantly it looks like no recent activity regarding this Chromium web browser engine on his GitHub.

https://github.com/AlwinEsch/web.browser.chromium

and CEF fork https://bitbucket.org/kodi-web/cef/src

I too would love the ability to be able to display web content in skins or scripts and have even have web addons in Kodi

http://forum.kodi.tv/showthread.php?tid=220842

I started the above linked thread which covers quite a lot of these ideas as a suggestion for last years GSoC and alwinus replied there.
Reply
#7
(2016-07-11, 12:48)membrane Wrote: What i'd like to see:
- Access to the EPG DB via JSON

I don't think this will make much sense. Many users don't use the EPG DB for caching. It just slows things down without giving any advantage if the backend has it's own DB.

Maybe I don't understand you correctly but accessing a database by bypassing the api and application logic is never a good idea.
Reply
#8
(2016-07-12, 15:52)Hedda Wrote: He even mentions the possibility to bring HbbTV support to Kodi and mentions it for use with web content used in TV channels.
[...]
I too would love the ability to be able to display web content in skins or scripts and have even have web addons in Kodi
I wouldn't like the ability to display full HTML 5 websites. I don't see any reason why Kodi should prefer a fully blown rendering engine over integrated add-ons. This goes against the philosophy of a 10-foot user interface.

HbbTV is broken by design and implementation. There are a lot of flaws which are not fixable, not even with the upcomming version 2.0. The user experience is horrible here in germany. But some ideas behind it are not bad and could be integrated into Kodi.

(2016-07-12, 17:39)FernetMenta Wrote:
(2016-07-11, 12:48)membrane Wrote: What i'd like to see:
- Access to the EPG DB via JSON

I don't think this will make much sense. Many users don't use the EPG DB for caching. It just slows things down without giving any advantage if the backend has it's own DB.
Too bad. I was under the impression that the BD was necessary. Do you think that additional metadata (like thumbnails, videos) is "important" enough to get support from the core?

(2016-07-12, 17:39)FernetMenta Wrote: Maybe I don't understand you correctly but accessing a database by bypassing the api and application logic is never a good idea.
Thats why I wrote that this is a horrible hack. Just a proof of concept. I'd like to see an API which allows me to add data to existing entries.
Reply
#9
(2016-07-15, 02:49)membrane Wrote:
(2016-07-12, 17:39)FernetMenta Wrote: Maybe I don't understand you correctly but accessing a database by bypassing the api and application logic is never a good idea.
Thats why I wrote that this is a horrible hack. Just a proof of concept. I'd like to see an API which allows me to add data to existing entries.

Extending the API is a different story, no reason why this should not be considered.
Reply
#10
(2016-07-05, 17:38)membrane Wrote: Please, could you expose the EPG database via JSON?

PVR.GetBroadcasts method seems what you are looking for. JSONRPC.Introspect method will show you all possibile actions and descriptions.
Reply
#11
(2016-07-15, 10:18)joethefox Wrote: PVR.GetBroadcasts method seems what you are looking for. JSONRPC.Introspect method will show you all possibile actions and descriptions.
I know, but that is read only. I want to add/manipulate some metadata:

- Thumbnail
- Fanart
- Path to video add-on of the channel
- Path/shortcut to the show directory of the add-on
- Path to video (German TV broadcasters host around 70% of the Live TV as VOD)
- IMDB link
- Episode number
- Alternative names
- Summary (an alternative short plot)
- Title

I think that the normal Live TV could be enriched with informations, just like it is the case with movies and series. The content is changing daily, but this doesn't impose much trouble. A thumbnail scraper would have to make 2-4 small get requests per day to fetch all relevant information.
Reply
#12
ah ok, sorry I had not understood your goal. Extending the API is certain the path to follow, something like "PVR.SetBroadcast". Out of curiosity, have you thought if there will be some impact with the recording timer rules?
Reply
#13
(2016-07-15, 11:54)joethefox Wrote: ah ok, sorry I had not understood your goal. Extending the API is certain the path to follow, something like "PVR.SetBroadcast". Out of curiosity, have you thought if there will be some impact with the recording timer rules?

Recording rules shouldn't be affected. A show entry itself is identified by an id, which I don't want to change. Web EPG sources might be more accurate than the DVB-* EPG, but I would have test this before jumping to any conclusion. I don't think that touching the start/end times is that beneficial. Added information like an episode number should even improve the recording function (or at least enhance the search).
Reply
#14
I've edited my original post to provide some additional information.
Reply
#15
Tough negotiation... Come on Team-Kodi - no drama, but "yes" or "no", please - it's better than waiting and dying out a not insubstantial(!) request-thread.

In the updated first post now you can find further information. At least(!) hundrets of users will love membranes further work, especially on "PVR Replay" - just let him know if you will give him direct support or not, that's all :-)
Reply

Logout Mark Read Team Forum Stats Members Help
Expose PVR database via JSON1