Skip to content

Commit 366e562

Browse files
DeltaMikeCharlieFlole998
authored andcommitted
XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing
1 parent f15f057 commit 366e562

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎src/epggrab/module/xmltv.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,18 @@ static int _xmltv_parse_age_rating
474474
rating_system = NULL;
475475
if ((attrib = htsmsg_get_map(rating, "attrib"))){
476476
rating_system = htsmsg_get_str(attrib, "system");
477-
}//END get the atrtibutes for the rating tag.
477+
}//END get the attributes for the rating tag.
478+
479+
//If no 'system' attribute was found, set a default one.
480+
if(!rating_system)
481+
{
482+
rating_system = "NONE";
483+
}
484+
478485
//Look for sub-tags of the 'rating' tag
479486
if ((tags = htsmsg_get_map(rating, "tags"))) {
480487
//Look the the 'value' tag containing the actual rating text
481488
if ((s1 = htsmsg_xml_get_cdata_str(tags, "value"))) {
482-
//tvherror(LS_RATINGLABELS, "XMLTV got system: '%s' / '%s'", rating_system, s1);
483489

484490
rl = ratinglabel_find_from_xmltv(rating_system, s1);
485491

0 commit comments

Comments
 (0)