Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
channel icon: fix the wrong load sequence (lost services)
  • Loading branch information
perexg committed Oct 26, 2014
1 parent dec23ca commit 6e82328
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/channels.c
Expand Up @@ -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 *
Expand Down Expand Up @@ -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) {
Expand All @@ -685,6 +690,9 @@ channel_create0
/* HTSP */
htsp_channel_add(ch);

/* determine icon URL */
(void)channel_get_icon(ch);

return ch;
}

Expand Down
1 change: 1 addition & 0 deletions src/channels.h
Expand Up @@ -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!
Expand Down

0 comments on commit 6e82328

Please sign in to comment.