From: Jaroslav Kysela Date: Fri, 25 Sep 2015 14:37:02 +0000 (+0200) Subject: config: add 'Channel icon name lower-case:' functionality, fixes #3101 X-Git-Tag: v4.2.1~2050 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca33fbf239db42682c83ebf7426b2dabea9bc9fb;p=thirdparty%2Ftvheadend.git config: add 'Channel icon name lower-case:' functionality, fixes #3101 --- diff --git a/src/channels.c b/src/channels.c index 6ae0619b8..adcd24d11 100644 --- a/src/channels.c +++ b/src/channels.c @@ -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++; } } diff --git a/src/config.c b/src/config.c index 35c94e40e..c61590efd 100644 --- a/src/config.c +++ b/src/config.c @@ -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", diff --git a/src/config.h b/src/config.h index 25cc86ed8..1dccd4a05 100644 --- a/src/config.h +++ b/src/config.h @@ -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;