void
channel_save ( channel_t *ch )
{
- htsmsg_t *c = htsmsg_create_map();
+ htsmsg_t *c;
if (ch->ch_dont_save == 0) {
+ c = htsmsg_create_map();
idnode_save(&ch->ch_id, c);
hts_settings_save(c, "channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
htsmsg_destroy(c);
http_client_close(dn->http_client);
dn->http_client = NULL;
}
- if (url)
+ if (url) {
+ free(dn->url);
dn->url = strdup(url);
+ }
dn->aux = aux;
gtimer_arm(&dn->fetch_timer, download_fetch, dn, 0);
}
htsp_event_add(eo);
notify_delayed(id, "epg", "create");
}
- dvr_event_updated(eo);
- dvr_autorec_check_event(eo);
- channel_event_updated(eo);
+ if (ebc->channel) {
+ dvr_event_updated(eo);
+ dvr_autorec_check_event(eo);
+ channel_event_updated(eo);
+ }
}
static epg_broadcast_t **_epg_broadcast_skel ( void )