Kodi Community Forum

Full Version: xbmc colour coded epg
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys,

I am finally managed to switch over to DVB-s2, tvheadend.

When using the dvb-t I had a nice colour coded epg, now its all grey, any idea why?

CHeers,
Neil
probably got to do with this so no solution at his time

http://forum.xbmc.org/showpost.php?p=786...tcount=496
Thanks moontan77.

I think you are right, I can see green in my EPG which must be music.
Has any one tried the fix at

https://www.lonelycoder.com/redmine/.../12/topics/301


Does this work, and what exactly does it do. It looks like it a mapping bug in tvheadend.
the link you posted doesn't work. and it's probably a mapping bug, because it works fine when using an xmltv epg source.
https://www.lonelycoder.com/redmine/boar...topics/301https:

I tried posted it again.

Sorry dushmanic, I am not sure what you mean but mapping bug.

I am using an xmltv epg source in tvheadend but the content type is null for all epgs apart from when its music.

Thanks,
Neil
in that case it sounds more like a bug in the xmltv provider you're using. it's not a bug in xbmc, that's for sure.
So do you use xmltv and recieve the correct content type in tvheadend?

I have 1 x DVB-T and 1 x Dual DVB-s2. The epg for the DVB-T seems to come with feed, this has the correct content type.

I use xmltv with the uk/ie radio times feed to get the epg for my channels, this works correctly and looking at the xml retrieved it contains the content type but in tvheadend it doesnt show, so it doesnt show in xbmc.

So I agree its not a xbmc issue but wondered if it was that tvheadend bug or am I doing something incorrectly.
yup, I'm using xmltv too and it works fine here. both in tvheadend and xbmc.
I'd love to see it work too, but it doesn't appear to work for uk/ie using tv_grab_uk_rt version 0.5.59, only item that maps is Music.


Kevin
Ah I see. Is there any alternative to tv_grab_uk_rt?

This makes sense now.

Thanks.
Ok I have done some further research. In my xmltv epg data cache I did some anaylsis and the reason
for the content type only working for Music is related to the string matching that happens (rightly or wrongly).

In epg.c in tvheadend it matches on these content types.

static const char *groupnames[16] = {
[1] = "Movie / Drama",
[2] = "News / Current affairs",
[3] = "Show / Games",
[4] = "Sports",
[5] = "Children's / Youth",
[6] = "Music",
[7] = "Art / Culture",
[8] = "Social / Political issues / Economics",
[9] = "Education / Science / Factual topics",
[10] = "Leisure hobbies",
[11] = "Special characteristics",

In my epg cache it has content types such as
. Music - works
. Sport - fails as it trys to match on sports
. Children - fails trys to match on Children's / Youth
. Motoring - fails - doesnt exist
. Arts and culture - fails - trys to match on Art /Culture
. Science - fails - try to match on Education / Science / Factual topics
. etc etc

Can anyone post some sample epg data, just to do some further digging.

it uses this to match the content type - which doesn't seem to contain fuzzy enough matching rules unless there is a strict
content type in the xmltv standard.

uint8_t
epg_content_group_find_by_name(const char *name)
{
int i;

for(i = 0; i < 16; i++) {
if(groupnames[i] != NULL && !strcmp(name, groupnames[i]))
return i;
}
return 0;
}

I see two possible reasons
1. The radiotime xmltv feeds for uk/ie don't follow the xmltv content type standard
2. The tvheadend matching should have fuzzy matching to handle this subtle differences -> this might be a custom build but would like something I contribute if there was a standard way to handle content types.

I am sure I could make this fuzzy matching work, I am a java programming so will need to google what the c++ methods for string matching Smile

dushmaniac
In the XMBC side how does it define the colours used to show the content type?
. Music -> Green
. Sport -> Red
etc


Thanks
Neil
xxxnelly Wrote:In the XBMC side how does it define the colours used to show the content type?
. Music -> Green
. Sport -> Red
etc

you should just make sure that it sets the correct value in EPG_TAG entries. the possible values can be found in https://github.com/opdenkamp/xbmc/blob/m...ypes.h#L61

EPG_TAG is defined in https://github.com/opdenkamp/xbmc/blob/m...pes.h#L245
dushmaniac - thanks.

I updated the tvheadend static values to test some of the values coming from the radiotimes.

This works as expected.

Anyone suggest what the correct fix is in tvheadend? Below is the list of the xmltv, XBMC and tvheadend rules.

Thanks,
Neil


XMLTV Radiotimes UK/IE
-------
Entertainment
Drama
Sci-fi
Documentary
Sport
Film
Factual
Interests
Arts and culture
No Genre
Music
Talk show
Comedy
Reality
Sitcom
News and current affairs
Animation
Game show
Children
Soap
Nature
Comedy drama
Education
Food
Motoring
Discussion/Debate
Science
Gardening
Travel
Current affairs
Home and property
Religion
Consumer
Health
Music and Arts
Drama documentary
Cookery
Transport

XBMC
------
/*! @Name PVR entry content event types */
//@{
#define EPG_EVENT_CONTENTMASK_MOVIEDRAMA 0x10
#define EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS 0x20
#define EPG_EVENT_CONTENTMASK_SHOW 0x30
#define EPG_EVENT_CONTENTMASK_SPORTS 0x40
#define EPG_EVENT_CONTENTMASK_CHILDRENYOUTH 0x50
#define EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE 0x60
#define EPG_EVENT_CONTENTMASK_ARTSCULTURE 0x70
#define EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS 0x80
#define EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE 0x90
#define EPG_EVENT_CONTENTMASK_LEISUREHOBBIES 0xA0
#define EPG_EVENT_CONTENTMASK_SPECIAL 0xB0
#define EPG_EVENT_CONTENTMASK_USERDEFINED 0xF0
//@}


tvheadend
-----------
static const char *groupnames[16] = {
[1] = "Movie / Drama",
[2] = "News / Current affairs",
[3] = "Show / Games",
[4] = "Sports",
[5] = "Children's / Youth",
[6] = "Music",
[7] = "Art / Culture",
[8] = "Social / Political issues / Economics",
[9] = "Education / Science / Factual topics",
[10] = "Leisure hobbies",
[11] = "Special characteristics",
This is a tricky area. The XMLTV specification doesn't define the categories that a program can belong to. I've had a similar challenge understanding what makes sense for all the various MythTV categories I've seen in our system and what other people have submitted.

<!-- Type of programme, eg 'soap', 'comedy' or whatever the
equivalents are in your language. There's no predefined set of
categories and it's okay for a programme to belong to several.
-->
<!ELEMENT category (#PCDATA)>

http://xmltv.cvs.sourceforge.net/xmltv/x...iew=markup