diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-11 11:38:05 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-11 11:38:05 +0200 |
commit | 1caa78a3e7456a2be71526fb0db151f3e3519dc9 (patch) | |
tree | 852fb107ca54be29c169dd2c6a32d364188dfdf9 /channels.c | |
parent | e61e1ed4252054ce31e4dad525ecbb579422eb4b (diff) | |
download | vdr-1caa78a3e7456a2be71526fb0db151f3e3519dc9.tar.gz vdr-1caa78a3e7456a2be71526fb0db151f3e3519dc9.tar.bz2 |
Fixed writing group separators to channels.conf that contain a comma
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 2.24 2012/07/14 12:15:00 kls Exp $ + * $Id: channels.c 3.1 2013/10/11 11:03:26 kls Exp $ */ #include "channels.h" @@ -503,12 +503,14 @@ cString cChannel::ToText(const cChannel *Channel) char FullName[strlen(Channel->name) + 1 + strlen(Channel->shortName) + 1 + strlen(Channel->provider) + 1 + 10]; // +10: paranoia char *q = FullName; q += sprintf(q, "%s", Channel->name); - if (!isempty(Channel->shortName)) - q += sprintf(q, ",%s", Channel->shortName); - else if (strchr(Channel->name, ',')) - q += sprintf(q, ","); - if (!isempty(Channel->provider)) - q += sprintf(q, ";%s", Channel->provider); + if (!Channel->groupSep) { + if (!isempty(Channel->shortName)) + q += sprintf(q, ",%s", Channel->shortName); + else if (strchr(Channel->name, ',')) + q += sprintf(q, ","); + if (!isempty(Channel->provider)) + q += sprintf(q, ";%s", Channel->provider); + } *q = 0; strreplace(FullName, ':', '|'); cString buffer; |