From: DeltaMikeCharlie <127641886+DeltaMikeCharlie@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:25:53 +0000 (+1000) Subject: XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=366e5629057e39de68932a0a0613a8af14076e31;p=thirdparty%2Ftvheadend.git XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing --- diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index f21133470..0dcaaa952 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -474,12 +474,18 @@ static int _xmltv_parse_age_rating rating_system = NULL; if ((attrib = htsmsg_get_map(rating, "attrib"))){ rating_system = htsmsg_get_str(attrib, "system"); - }//END get the atrtibutes for the rating tag. + }//END get the attributes for the rating tag. + + //If no 'system' attribute was found, set a default one. + if(!rating_system) + { + rating_system = "NONE"; + } + //Look for sub-tags of the 'rating' tag if ((tags = htsmsg_get_map(rating, "tags"))) { //Look the the 'value' tag containing the actual rating text if ((s1 = htsmsg_xml_get_cdata_str(tags, "value"))) { - //tvherror(LS_RATINGLABELS, "XMLTV got system: '%s' / '%s'", rating_system, s1); rl = ratinglabel_find_from_xmltv(rating_system, s1);