]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
channel: icons - do not generate auto icon URL with {name-not-set}, fixes #2661
authorJaroslav Kysela <perex@perex.cz>
Tue, 10 Feb 2015 08:41:28 +0000 (09:41 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 10 Feb 2015 08:41:28 +0000 (09:41 +0100)
src/channels.c

index c85376feb4ada2532b7659791d43189f6fb49fb3..615046a2cf1d5b31ef77550aace5dea398247454 100644 (file)
@@ -45,6 +45,8 @@
 #include "bouquet.h"
 #include "intlconv.h"
 
+#define CHANNEL_BLANK_NAME  "{name-not-set}"
+
 struct channel_tree channels;
 
 struct channel_tag_queue channel_tags;
@@ -575,7 +577,7 @@ channel_set_tags_by_list ( channel_t *ch, htsmsg_t *tags )
 const char *
 channel_get_name ( channel_t *ch )
 {
-  static const char *blank = "{name-not-set}";
+  static const char *blank = CHANNEL_BLANK_NAME;
   const char *s;
   channel_service_mapping_t *csm;
   if (ch->ch_name && *ch->ch_name) return ch->ch_name;
@@ -642,7 +644,8 @@ channel_get_icon ( channel_t *ch )
 
     /* No user icon - try to get the channel icon by name */
     if (!pick && chicon && chicon[0] >= ' ' && chicon[0] <= 122 &&
-        (chname = channel_get_name(ch)) != NULL && chname[0]) {
+        (chname = channel_get_name(ch)) != NULL && chname[0] &&
+        strcmp(chname, CHANNEL_BLANK_NAME)) {
       const char *chi, *send, *sname, *s;
       chi = strdup(chicon);