1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Channel names containing commas are now handled correctly in channels.conf

This commit is contained in:
Klaus Schmidinger 2009-12-24 10:49:16 +01:00
parent d8d65c7536
commit 64b6642851
4 changed files with 18 additions and 6 deletions

View File

@ -6197,7 +6197,7 @@ Video Disk Recorder Revision History
- Fixed the default value for "Pause key handling" in the MANUAL (reported by
Diego Pierotto).
2009-12-23: Version 1.7.11
2009-12-24: Version 1.7.11
- Fixed resetting the file size when regenerating the index file.
- The new function cDevice::PatPmtParser() can be used in derived devices to access
@ -6222,4 +6222,5 @@ Video Disk Recorder Revision History
- Updated sources.conf (thanks to Derek Kelly).
- Modified cCharSetConv so that it can be used to convert from "whatever VDR uses"
to a given code (thanks to Joachim Wilke).
- Channel names containing commas are now handled correctly in channels.conf.
If a channel's short name contains a comma, it is replaced with a '.'.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: channels.c 2.9 2009/12/05 15:28:32 kls Exp $
* $Id: channels.c 2.10 2009/12/23 15:56:03 kls Exp $
*/
#include "channels.h"
@ -727,6 +727,8 @@ cString cChannel::ToText(const cChannel *Channel)
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);
*q = 0;
@ -901,7 +903,7 @@ bool cChannel::Parse(const char *s)
*p++ = 0;
provider = strcpyrealloc(provider, p);
}
p = strchr(namebuf, ',');
p = strrchr(namebuf, ','); // long name might contain a ',', so search for the rightmost one
if (p) {
*p++ = 0;
shortName = strcpyrealloc(shortName, p);

7
sdt.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: sdt.c 2.3 2009/12/13 11:54:33 kls Exp $
* $Id: sdt.c 2.4 2009/12/23 16:02:47 kls Exp $
*/
#include "sdt.h"
@ -72,6 +72,11 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
strcpy(ShortNameBuf, skipspace(p));
}
}
// Avoid ',' in short name (would cause trouble in channels.conf):
for (char *p = ShortNameBuf; *p; p++) {
if (*p == ',')
*p = '.';
}
sd->providerName.getText(ProviderNameBuf, sizeof(ProviderNameBuf));
char *pp = compactspace(ProviderNameBuf);
if (channel) {

6
vdr.5
View File

@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
.\" $Id: vdr.5 2.7 2009/10/18 14:09:07 kls Exp $
.\" $Id: vdr.5 2.8 2009/12/24 10:47:38 kls Exp $
.\"
.TH vdr 5 "10 Feb 2008" "1.6" "Video Disk Recorder Files"
.SH NAME
@ -65,6 +65,10 @@ as in
\fBRTL Television,RTL:...\fR
If the short name itself would contain a comma, it is replaced with a '.'.
Note that some long channel names may contain a comma, so the delimiting comma
is always the rightmost one.
If present, the name of the service provider or "bouquet" is appended
to the channel name, separated by a semicolon, as in