]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing
authorDeltaMikeCharlie <127641886+DeltaMikeCharlie@users.noreply.github.com>
Fri, 14 Jun 2024 19:25:53 +0000 (05:25 +1000)
committerFlole <Flole998@users.noreply.github.com>
Sat, 15 Jun 2024 07:32:43 +0000 (09:32 +0200)
src/epggrab/module/xmltv.c

index f21133470d0214141a71d938adce013c1afbc7d4..0dcaaa952db42a6f1cf77b7ef8a01ea63461b0bc 100644 (file)
@@ -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);