Feature #4441

pass to client or parse more information from XMLTV

Added by piotr galek 6 months ago. Updated about 1 month ago.

Status:NewStart date:2017-06-19
Priority:NormalDue date:
Assignee:Adam Sutton% Done:

0%

Category:EPG - Grabbers
Target version:4.6

Description

Hi
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>
    <credits>
      <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>
    </credits>
    <date>2006</date>
    <category lang="pl">Serial Sensacyjny</category>
    <icon src="http://ocdn.eu/images/program-tv/MmQ7MDA_/b1065f71c129750b882a1e20274a1589.jpg" />
    <country>USA</country>
    <episode-num system="onscreen">S3 E23</episode-num>
    <rating>
      <value>12</value>
    </rating>
  </programme>

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
Added by Em Smith 2 months 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
information.

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
individually.

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

History

#1 Updated by piotr galek 6 months ago

PS. all that additional fields are available in kodi epg database
https://github.com/xbmc/xbmc/blob/master/xbmc/pvr/epg/EpgInfoTag.cpp#L577

#2 Updated by Jaroslav Kysela 6 months ago

  • Target version set to 4.6

#3 Updated by Em Smith 2 months 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',
...

Example:

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

[[https://github.com/tvheadend/tvheadend/pull/997]]

#4 Updated by Em Smith about 1 month 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
[[https://github.com/tvheadend/tvheadend/blob/master/src/epggrab/module/xmltv.c]]
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