channel_save ( channel_t *ch )
{
htsmsg_t *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);
+ if (ch->ch_dont_save == 0) {
+ idnode_save(&ch->ch_id, c);
+ hts_settings_save(c, "channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
+ htsmsg_destroy(c);
+ }
/* update the EPG channel <-> channel mapping here */
if (ch->ch_enabled && ch->ch_epgauto)
epggrab_channel_add(ch);
RB_ENTRY(channel) ch_link;
int ch_refcount;
- int ch_zombie;
int ch_load;
+ int ch_dont_save;
/* Channel info */
int ch_enabled;
{
}
+static void
+tsfile_service_delete ( service_t *s, int delconf )
+{
+ mpegts_service_delete(s, 0);
+}
+
/*
* Network definition
*/
// TODO: HACK: REMOVE ME
if (s) {
s->s_config_save = tsfile_service_config_save;
+ s->s_delete = tsfile_service_delete;
pthread_mutex_unlock(&tsfile_lock);
channel_t *c = channel_create(NULL, NULL, NULL);
- service_mapper_link((service_t*)s, c, NULL);
+ if (c) {
+ c->ch_dont_save = 1;
+ service_mapper_link((service_t*)s, c, NULL);
+ }
}
else
pthread_mutex_unlock(&tsfile_lock);
snprintf(chbuf, sizeof(chbuf), "%u", channel_get_major(chnum));
htsbuf_qprintf(hq,
" refcount = %d\n"
- " zombie = %d\n"
" number = %s\n"
" icon = %s\n\n",
ch->ch_refcount,
- ch->ch_zombie,
chbuf,
channel_get_icon(ch) ?: "<none set>");
}