@@ -1221,6 +1221,15 @@ dvr_entry_create_from_htsmsg(htsmsg_t *conf, epg_broadcast_t *e)
12211221 if (e -> rating_label -> rl_icon ){
12221222 htsmsg_add_str (conf , "rating_icon_saved" , imagecache_get_propstr (e -> rating_label -> rl_icon , tbuf , sizeof (tbuf )));
12231223 }
1224+
1225+ if (e -> rating_label -> rl_country ){
1226+ htsmsg_add_str (conf , "rating_country_saved" , e -> rating_label -> rl_country );
1227+ }
1228+
1229+ if (e -> rating_label -> rl_authority ){
1230+ htsmsg_add_str (conf , "rating_authority_saved" , e -> rating_label -> rl_authority );
1231+ }
1232+
12241233 }
12251234 }//END rating labels enabled.
12261235
@@ -3465,6 +3474,22 @@ dvr_entry_class_rating_set(void *o, const void *v)
34653474 de -> de_rating_icon_saved = strdup (rl -> rl_icon );
34663475 }
34673476
3477+ if (de -> de_rating_authority_saved ){
3478+ free (de -> de_rating_authority_saved );
3479+ }
3480+
3481+ if (rl -> rl_authority ){
3482+ de -> de_rating_authority_saved = strdup (rl -> rl_authority );
3483+ }
3484+
3485+ if (de -> de_rating_country_saved ){
3486+ free (de -> de_rating_country_saved );
3487+ }
3488+
3489+ if (rl -> rl_country ){
3490+ de -> de_rating_country_saved = strdup (rl -> rl_country );
3491+ }
3492+
34683493 return 1 ;
34693494 }//END we got an RL object.
34703495
@@ -4074,6 +4099,53 @@ dvr_entry_class_rating_label_get(void *o)
40744099 return & prop_ptr ;
40754100}
40764101
4102+ static const void *
4103+ dvr_entry_class_rating_authority_get (void * o )
4104+ {
4105+ dvr_entry_t * de = (dvr_entry_t * )o ;
4106+ ratinglabel_t * rl = de -> de_rating_label ;
4107+ if (rl == NULL ) {
4108+ prop_ptr = "" ;
4109+ if (de -> de_rating_authority_saved ){
4110+ prop_ptr = de -> de_rating_authority_saved ;
4111+ }
4112+ } else {
4113+ if (de -> de_sched_state == DVR_SCHEDULED ){
4114+ prop_ptr = rl -> rl_authority ;
4115+ }
4116+ else
4117+ {
4118+ prop_ptr = de -> de_rating_authority_saved ;
4119+ }
4120+
4121+ }
4122+ return & prop_ptr ;
4123+ }
4124+
4125+ static const void *
4126+ dvr_entry_class_rating_country_get (void * o )
4127+ {
4128+ dvr_entry_t * de = (dvr_entry_t * )o ;
4129+ ratinglabel_t * rl = de -> de_rating_label ;
4130+ if (rl == NULL ) {
4131+ prop_ptr = "" ;
4132+ if (de -> de_rating_country_saved ){
4133+ prop_ptr = de -> de_rating_country_saved ;
4134+ }
4135+ } else {
4136+ if (de -> de_sched_state == DVR_SCHEDULED ){
4137+ prop_ptr = rl -> rl_country ;
4138+ }
4139+ else
4140+ {
4141+ prop_ptr = de -> de_rating_country_saved ;
4142+ }
4143+
4144+ }
4145+ return & prop_ptr ;
4146+ }
4147+
4148+
40774149static const void *
40784150dvr_entry_class_duplicate_get (void * o )
40794151{
@@ -4791,6 +4863,22 @@ const idclass_t dvr_entry_class = {
47914863 .off = offsetof(dvr_entry_t , de_rating_icon_saved ),
47924864 .opts = PO_RDONLY | PO_NOUI ,
47934865 },
4866+ {
4867+ .type = PT_STR ,
4868+ .id = "rating_authority_saved" ,
4869+ .name = N_ ("Saved Rating Authority" ),
4870+ .desc = N_ ("Saved parental rating authority for once recording is complete." ),
4871+ .off = offsetof(dvr_entry_t , de_rating_authority_saved ),
4872+ .opts = PO_RDONLY | PO_NOUI ,
4873+ },
4874+ {
4875+ .type = PT_STR ,
4876+ .id = "rating_country_saved" ,
4877+ .name = N_ ("Saved Rating Country" ),
4878+ .desc = N_ ("Saved parental rating country for once recording is complete." ),
4879+ .off = offsetof(dvr_entry_t , de_rating_country_saved ),
4880+ .opts = PO_RDONLY | PO_NOUI ,
4881+ },
47944882 //This needs to go after the 'saved' properties because loading the RL object
47954883 //can refresh the 'saved' objects for scheduled entries.
47964884 {
@@ -4812,6 +4900,22 @@ const idclass_t dvr_entry_class = {
48124900 .get = dvr_entry_class_rating_icon_url_get ,
48134901 .opts = PO_HIDDEN | PO_RDONLY | PO_NOSAVE | PO_NOUI ,
48144902 },
4903+ {
4904+ .type = PT_STR ,
4905+ .id = "rating_authority" ,
4906+ .name = N_ ("Rating Authority" ),
4907+ .desc = N_ ("Rating Authority." ),
4908+ .get = dvr_entry_class_rating_authority_get ,
4909+ .opts = PO_HIDDEN | PO_RDONLY | PO_NOSAVE | PO_NOUI ,
4910+ },
4911+ {
4912+ .type = PT_STR ,
4913+ .id = "rating_country" ,
4914+ .name = N_ ("Rating Country" ),
4915+ .desc = N_ ("Rating Country." ),
4916+ .get = dvr_entry_class_rating_country_get ,
4917+ .opts = PO_HIDDEN | PO_RDONLY | PO_NOSAVE | PO_NOUI ,
4918+ },
48154919 {
48164920 .type = PT_STR ,
48174921 .id = "rating_label" ,
0 commit comments