summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-10 12:46:01 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-10 12:46:01 +0200
commit1c9d172bc985d8d2a7d2cf86aa59461ff9bc225a (patch)
treee5bf972d2dcc766782fff10e41a483d6babbe194 /recording.c
parent1241db48d38d70fa347ba9531a1263351df4df8d (diff)
downloadvdr-1c9d172bc985d8d2a7d2cf86aa59461ff9bc225a.tar.gz
vdr-1c9d172bc985d8d2a7d2cf86aa59461ff9bc225a.tar.bz2
Fixed converting summary.vdr files that would result in a very long 'short text'
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/recording.c b/recording.c
index 474c8ad0..3640a8e9 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.112 2005/09/03 13:16:57 kls Exp $
+ * $Id: recording.c 1.113 2005/09/10 12:36:48 kls Exp $
*/
#include "recording.h"
@@ -496,6 +496,20 @@ cRecording::cRecording(const char *FileName)
data[2] = data[1];
data[1] = NULL;
}
+ else if (line == 2) {
+ // if line 1 is too long, it can't be the short text,
+ // so assume the short text is missing and concatenate
+ // line 1 and line 2 to be the long text:
+ int len = strlen(data[1]);
+ if (len > 80) {
+ data[1] = (char *)realloc(data[1], len + 1 + strlen(data[2]) + 1);
+ strcat(data[1], "\n");
+ strcat(data[1], data[2]);
+ free(data[2]);
+ data[2] = data[1];
+ data[1] = NULL;
+ }
+ }
info->SetData(data[0], data[1], data[2]);
for (int i = 0; i < 3; i ++)
free(data[i]);