Try to set EPG content type based on info from XML TV.
Based on patch from Stéphane Bidoul
This commit is contained in:
parent
65f42d8f0c
commit
2cc017ffed
1 changed files with 8 additions and 1 deletions
|
@ -482,6 +482,7 @@ xmltv_parse_programme_tags(xmltv_channel_t *xc, htsmsg_t *tags,
|
|||
channel_t *ch;
|
||||
const char *title = xmltv_get_cdata_by_tag(tags, "title");
|
||||
const char *desc = xmltv_get_cdata_by_tag(tags, "desc");
|
||||
const char *category = xmltv_get_cdata_by_tag(tags, "category");
|
||||
int created;
|
||||
epg_episode_t episode;
|
||||
|
||||
|
@ -501,7 +502,13 @@ xmltv_parse_programme_tags(xmltv_channel_t *xc, htsmsg_t *tags,
|
|||
|
||||
if(desc != NULL)
|
||||
changed |= epg_event_set_desc(e, desc);
|
||||
|
||||
|
||||
if(category != NULL) {
|
||||
uint8_t type = epg_content_group_find_by_name(category);
|
||||
if(type)
|
||||
changed |= epg_event_set_content_type(e, type);
|
||||
}
|
||||
|
||||
changed |= epg_event_set_episode(e, &episode);
|
||||
|
||||
if(changed)
|
||||
|
|
Loading…
Add table
Reference in a new issue