]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
channel icon: fix the wrong load sequence (lost services)
authorJaroslav Kysela <perex@perex.cz>
Sun, 26 Oct 2014 20:28:37 +0000 (21:28 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 26 Oct 2014 20:43:08 +0000 (21:43 +0100)
src/channels.c
src/channels.h

index 7227594463a7101d49b07404da5959c90075e4b8..aa555c1fca75dbf292566e380a8468f29be167bd 100644 (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;
 }
 
index 7b1e4ff9c0792158515376fc8fed7ac9eb6f9189..fbc1e773d2f327907d7ca6929a12170cb6fb2cbf 100644 (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!