summaryrefslogtreecommitdiff
path: root/summary2info.pl
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 /summary2info.pl
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 'summary2info.pl')
-rwxr-xr-xsummary2info.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/summary2info.pl b/summary2info.pl
index f757ac36..42906774 100755
--- a/summary2info.pl
+++ b/summary2info.pl
@@ -10,7 +10,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: summary2info.pl 1.3 2005/06/04 11:33:09 kls Exp $
+# $Id: summary2info.pl 1.4 2005/09/10 12:40:40 kls Exp $
$VideoDir = $ARGV[0] || die "please provide the name of the video directory\n";
@@ -37,6 +37,15 @@ for $SummaryFile (@SummaryFiles) {
$data[2] = $data[1];
$data[1] = "";
}
+ elsif ($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:
+ if (length($data[1]) > 80) {
+ $data[2] = $data[1] . "|" . $data[2];
+ $data[1] = "";
+ }
+ }
($InfoFile = $SummaryFile) =~ s/summary\.vdr$/info.vdr/;
open(F, ">$InfoFile") || die "$InfoFile: $!\n";
print F "T $data[0]\n" if ($data[0]);