channel icon: fix the wrong load sequence (lost services)

This commit is contained in:
Jaroslav Kysela 2014-10-26 21:28:37 +01:00
parent dec23cab69
commit 6e82328003
2 changed files with 11 additions and 2 deletions

View file

@ -168,7 +168,9 @@ channel_class_tags_set ( void *obj, const void *p )
static void
channel_class_icon_notify ( void *obj )
{
(void)channel_get_icon(obj);
channel_t *ch = obj;
if (!ch->ch_load)
(void)channel_get_icon(obj);
}
static const void *
@ -670,8 +672,11 @@ channel_create0
abort();
}
if (conf)
if (conf) {
ch->ch_load = 1;
idnode_load(&ch->ch_id, conf);
ch->ch_load = 0;
}
/* Override the name */
if (name) {
@ -685,6 +690,9 @@ channel_create0
/* HTSP */
htsp_channel_add(ch);
/* determine icon URL */
(void)channel_get_icon(ch);
return ch;
}

View file

@ -45,6 +45,7 @@ typedef struct channel
int ch_refcount;
int ch_zombie;
int ch_load;
/* Channel info */
char *ch_name; // Note: do not access directly!