]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
config: add 'Channel icon name lower-case:' functionality, fixes #3101
authorJaroslav Kysela <perex@perex.cz>
Fri, 25 Sep 2015 14:37:02 +0000 (16:37 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 25 Sep 2015 14:37:02 +0000 (16:37 +0200)
src/channels.c
src/config.c
src/config.h

index 6ae0619b826e37e2e92e1ba29d2fc7665d3e1c3c..adcd24d11831e3bed6b42503b1b0b589f421d809 100644 (file)
@@ -595,6 +595,8 @@ channel_get_icon ( channel_t *ch )
           if (*s <= ' ' || *s > 122 ||
               strchr("/:\\<>|*?'\"", *s) != NULL)
             *(char *)s = '_';
+          else if (config.chicon_lowercase && *s >= 'A' && *s <= 'Z')
+            *(char *)s = *s - 'A' + 'a';
           s++;
         }
       }
index 35c94e40efefcc4c8570951641ddb701bbaf643d..c61590efd3fde15c8a5d5b2fa34447eb3751c973 100644 (file)
@@ -1953,6 +1953,13 @@ const idclass_t config_class = {
       .off    = offsetof(config_t, chicon_path),
       .group  = 6,
     },
+    {
+      .type   = PT_BOOL,
+      .id     = "chiconlowercase",
+      .name   = N_("Channel icon name lower-case"),
+      .off    = offsetof(config_t, chicon_lowercase),
+      .group  = 6,
+    },
     {
       .type   = PT_STR,
       .id     = "piconpath",
index 25cc86ed86ccfe5640f7530531998c7dd9e2d462..1dccd4a0578d063765363664a512caa84dca2838 100644 (file)
@@ -37,6 +37,7 @@ typedef struct config {
   char *muxconf_path;
   int prefer_picon;
   char *chicon_path;
+  int chicon_lowercase;
   char *picon_path;
   int tvhtime_update_enabled;
   int tvhtime_ntp_enabled;