Feature #4441

pass to client or parse more information from XMLTV

Added by piotr galek almost 5 years ago. Updated over 4 years ago.

EPG - Grabbers
Target version:
Start date:
Due date:
% Done:


Estimated time:


I saw XMLTV delivery many information like on example:

<programme start="20170621100000 +0200" stop="20170621110000 +0200" channel="CBS Action">
    <title lang="pl">Agenci NCIS</title>
    <title lang="xx">Navy NCIS: Naval Criminal Investigative Service</title>
    <desc lang="pl">Gibbs zostaje ranny w zamachu terrorystycznym. Członkowie jego zespołu są przygnębieni. Tony zastępuje szefa. Jego decyzja wzbudza niechęć pozostałych agentów. Tymczasem Gibbs powoli wraca do zdrowia. Ma czas na rozmyślania. Próbuje sobie poradzić ze wspomnieniami, które od dawna próbował wymazać z pamięci</desc>
      <director>Dennis Smith</director>
      <actor>Mark Harmon</actor>
      <actor>Michael Weatherly</actor>
      <actor>Pauley Perrette</actor>
      <actor>David McCallum</actor>
      <actor>Sean Murray</actor>
      <actor>Cote de Pablo</actor>
      <actor>Lauren Holly</actor>
    <category lang="pl">Serial Sensacyjny</category>
    <icon src="" />
    <episode-num system="onscreen">S3 E23</episode-num>

but information like:
- country
- date
- actor
- director

and maybe more

are not pass to client - like pvr.hts kodi ...
i uderstand some information are not important to parse and show on TVH WebUI - but at least could be forwarded to client ...

Associated revisions

Revision db437039 (diff)
Added by Em Smith over 4 years ago

xmltv: Parse credits, category, keyword and more age ratings. (#4441)

The xmltv provides additional information about programmes such
as keywords ("Zookeeper", "Newscast", "Lion", "Mystery"), and
categories ("Crime drama", "Movie", "Series"). It can also provide
detailed information about actors, writers, editors, composers, etc.

We parse this information and allow it to be searched from the GUI.

We make this configurable since having 20+ actors per movie can
increase memory usage of the server and the clients to which we
send this information.

We also offer an option to append this information on to the
description. This allows people with old clients to see the

We cache this information in to a csv string so users can search
across multiple actors such as "Douglas.*Stallone" to find movies
where both actors starred, rather than searching across each actor

The category is not currently searchable via regex since I think
that should probably be a search box similar to content type.

We currently only parse and store a few of the credits, viz., actor,
guest, presenter, writer, and director. If people really search for
films based on the composer or editor then we can add it in the future.

This information is stored on the epg_broadcast rather than the
epg_episode since theoretically a programme could have different
information for different showings of the same programme.

For example, my broadcaster shows the same film in the same week but
prefixes the description of some showings with a keyword (such as
"Frightfest") with other film of the same genre to create a pseudo-boxset.
Thus if we ever scrape keywords from EIT we'd probably tag the particular
films with this keyword as a tag on which people could search.

Similarly for credits, a daytime showing of a programme can contain edits
for violence, swearing that are not in the late night showing, thus potentially
changing the cast despite being the same "episode", or perhaps one showing
is dubbed.

We also parse a few more age ratings since a number of programmes
only have "word" ratings rather than age ratings (TV-14 instead of 14).
Also the existing age could underflow since one rating system
uses negative numbers which don't fit in our unsigned byte.

Issue: #4441



Updated by piotr galek almost 5 years ago

PS. all that additional fields are available in kodi epg database


Updated by Jaroslav Kysela almost 5 years ago

  • Target version set to 999

Updated by Em Smith over 4 years ago

We now publish extra information to clients if it is available and the option is enabled in the grabber. This is the server-side change only and no patches have been done for the Kodi side since I can't easily cross-compile it to test. Please refer any Kodi developers to this request for details of the additional fields we publish.

Enabling the option can use considerable memory on the server and the clients, especially if you have hundreds of channels with tens of actors per programme and a tv guide stretching several weeks in the future.

I suggest the pvr hts modification should have a tick box to disable passing the data to Kodi even if it is available to avoid low-spec machines being overwhelmed due to limited memory.

The htsp has been updated to have the extra information, for example:

'category': ['Action', 'Drama', 'Episode', 'Series', 'series'],
'credits': { 'Branscombe Richmond': 'guest',
'Bruce Glover': 'guest',
'Cherie Michan': 'guest',
'Craig R. Baxley': 'director',
'Dennis Franz': 'guest',
'Dirk Benedict': 'actor',
'Dwight Schultz': 'actor',
'Garnett Smith': 'guest',
'George Peppard': 'actor',
'Lloyd Bochner': 'guest',
'Maylo McCashlin': 'guest',
'Mr. T': 'actor'},
'method': 'eventAdd',


'category': ['Feature Film', 'Movie', 'Western', 'movie'],
'copyrightYear': 1947,
'credits': { 'Andre de Toth': 'director',
'Arleen Whelan': 'actor',
'Veronica Lake': 'actor'},
'keyword': [ '1880s',...
'method': 'eventUpdate',



Updated by Em Smith over 4 years ago

Following implementation in pvr.hts, a few clarifications are necessary for other people implementing a client.

The above sample message didn't show a few other roles we pass through for credits which are in
They are currently actor, director, guest, presenter, and writer.

The credits is a htsmsg_map since it is a name/value mapping and hstmsg_list can't have a name for the field.

Also available in: Atom PDF