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

Replacing problematic characters in recording names

This commit is contained in:
Klaus Schmidinger 2000-11-01 16:04:57 +01:00
parent 9d27e34363
commit ef7f4ea176
2 changed files with 11 additions and 1 deletions

View File

@ -262,3 +262,6 @@ Video Disk Recorder Revision History
'2'.
- Fixed initializing the RCU remote control code (didn't work after switching
on the system).
- Problematic characters in recording names (which can come from timers that
are programmed via the "Schedules" menu) are now replaced by suitable
substitutes.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.19 2000/10/08 12:20:53 kls Exp $
* $Id: recording.c 1.20 2000/11/01 16:00:36 kls Exp $
*/
#define _GNU_SOURCE
@ -86,6 +86,13 @@ cRecording::cRecording(cTimer *Timer)
titleBuffer = NULL;
fileName = NULL;
name = strdup(Timer->file);
// substitute characters that would cause problems in file names:
for (char *p = name; *p; p++) {
switch (*p) {
case '\n': *p = ' '; break;
case '/': *p = '-'; break;
}
}
summary = Timer->summary ? strdup(Timer->summary) : NULL;
if (summary)
strreplace(summary, '|', '\n');