if (ee->age_rating)
htsmsg_add_u32(m, "ageRating", ee->age_rating);
+ if (ee->first_aired)
+ htsmsg_add_s64(m, "first_aired", ee->first_aired);
if (ee->copyright_year)
htsmsg_add_u32(m, "copyrightYear", ee->copyright_year);
return de ? &de->de_start : &null;
}
+static const void *
+dvr_entry_class_first_aired_get(void *o)
+{
+ static time_t null = 0;
+ const dvr_entry_t *de = (const dvr_entry_t *)o;
+ return de && de->de_bcast && de->de_bcast->episode ?
+ &de->de_bcast->episode->first_aired : &null;
+}
+
static const void *
dvr_entry_class_category_get(void *o)
{
.get = dvr_entry_class_duplicate_get,
.opts = PO_RDONLY | PO_NOSAVE | PO_ADVANCED,
},
+ {
+ .type = PT_TIME,
+ .id = "first_aired",
+ .name = N_("First aired"),
+ .desc = N_("Time when the program was first aired"),
+ .get = dvr_entry_class_first_aired_get,
+ .opts = PO_RDONLY | PO_NOSAVE | PO_ADVANCED,
+ },
{
.type = PT_STR,
.id = "comment",