mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed converting summary.vdr files that would result in a very long 'short text'
This commit is contained in:
parent
1241db48d3
commit
1c9d172bc9
@ -13,6 +13,7 @@ Carsten Koch <Carsten.Koch@icem.de>
|
||||
for suggesting that the "Back" button in replay mode should bring up the "Recordings" menu
|
||||
for fixing the watchdog timer if the program hangs in OSD activities
|
||||
for his support in keeping the Premiere World channels up to date in 'channels.conf'
|
||||
for fixing converting summary.vdr files that would result in a very long 'short text'
|
||||
|
||||
Plamen Ganev <pganev@com-it.net>
|
||||
for fixing the frequency offset for Hotbird channels
|
||||
|
4
HISTORY
4
HISTORY
@ -3747,7 +3747,7 @@ Video Disk Recorder Revision History
|
||||
- The new SVDRP command EDIT can be used to start the editing process of a recording
|
||||
(based on the CUTR patch by Harald Milz).
|
||||
|
||||
2005-09-09: Version 1.3.32
|
||||
2005-09-10: Version 1.3.32
|
||||
|
||||
- Added some missing braces in remux.c (thanks to Wayne Keer for reporting this one).
|
||||
- Removed unused MAINMENUENTRY from svdrpdemo.c (thanks to Udo Richter for reporting
|
||||
@ -3802,3 +3802,5 @@ Video Disk Recorder Revision History
|
||||
reporting this one).
|
||||
- Fixed defining timers that only differ in the day of week (thanks to Patrick
|
||||
Rother for reporting this one).
|
||||
- Fixed converting summary.vdr files that would result in a very long 'short text'
|
||||
(thanks to Carsten Koch).
|
||||
|
16
recording.c
16
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]);
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user