Minor correction to the handling of content types in DVR auto rec table.
This commit is contained in:
parent
425e9f7f87
commit
bc5937089d
1 changed files with 14 additions and 1 deletions
|
@ -222,6 +222,7 @@ build_weekday_mask(const char *str)
|
||||||
static htsmsg_t *
|
static htsmsg_t *
|
||||||
autorec_record_build(dvr_autorec_entry_t *dae)
|
autorec_record_build(dvr_autorec_entry_t *dae)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
char str[30];
|
char str[30];
|
||||||
htsmsg_t *e = htsmsg_create_map();
|
htsmsg_t *e = htsmsg_create_map();
|
||||||
|
|
||||||
|
@ -241,7 +242,11 @@ autorec_record_build(dvr_autorec_entry_t *dae)
|
||||||
if(dae->dae_channel_tag != NULL)
|
if(dae->dae_channel_tag != NULL)
|
||||||
htsmsg_add_str(e, "tag", dae->dae_channel_tag->ct_name);
|
htsmsg_add_str(e, "tag", dae->dae_channel_tag->ct_name);
|
||||||
|
|
||||||
|
// Note: Mixed usage creates problems, for now we have to store
|
||||||
|
// both values!
|
||||||
htsmsg_add_u32(e, "contenttype",dae->dae_content_type);
|
htsmsg_add_u32(e, "contenttype",dae->dae_content_type);
|
||||||
|
if ((s = epg_content_group_get_name(dae->dae_content_type)))
|
||||||
|
htsmsg_add_str(e, "contentgrp", s);
|
||||||
|
|
||||||
htsmsg_add_str(e, "title", dae->dae_title ?: "");
|
htsmsg_add_str(e, "title", dae->dae_title ?: "");
|
||||||
|
|
||||||
|
@ -349,7 +354,15 @@ autorec_record_update(void *opaque, const char *id, htsmsg_t *values,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dae->dae_content_type = htsmsg_get_u32_or_default(values, "contenttype", 0);
|
// Note: unfortunately there is a mixed usage here, DVR code uses
|
||||||
|
// contenttype however UI code uses contentgrp. so we test for both!
|
||||||
|
if (htsmsg_get_u32(values, "contenttype", &u32)) {
|
||||||
|
if ((s = htsmsg_get_str(values, "contentgrp")))
|
||||||
|
u32 = epg_content_group_find_by_name(s);
|
||||||
|
else
|
||||||
|
u32 = 0;
|
||||||
|
}
|
||||||
|
dae->dae_content_type = u32;
|
||||||
|
|
||||||
if((s = htsmsg_get_str(values, "approx_time")) != NULL) {
|
if((s = htsmsg_get_str(values, "approx_time")) != NULL) {
|
||||||
if(strchr(s, ':') != NULL) {
|
if(strchr(s, ':') != NULL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue