diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-01-10 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-01-10 18:00:00 +0100 |
commit | 3e1d34f392792bbcf1bda4884c58ca9cec445d1d (patch) | |
tree | e2c9910b5a7d429784eeda4404ea7429e757a8f3 /recording.c | |
parent | 48fd2b04e9010bb67e19f33e8c7506a976b70e90 (diff) | |
download | vdr-patch-lnbsharing-3e1d34f392792bbcf1bda4884c58ca9cec445d1d.tar.gz vdr-patch-lnbsharing-3e1d34f392792bbcf1bda4884c58ca9cec445d1d.tar.bz2 |
Version 1.1.21vdr-1.1.21
- Fixed the 'channels.conf' entries for "Studio Universal" and "Disney Channel".
- Fixed handling channels in the "Channels" menu in case there are ':@nnn' group
separators without names (thanks to Guy Roussin for reporting this one).
- The SVDRP command CHAN now also accepts channel IDs.
- Increased the timeout until an index file is considerd no longer to be written
(sometimes in time shift with heavy system load the index file was closed too
early by the replay thread).
- Implemented "Link Layer" based CAM support, which hopefully will solve the
problems with CAMs we had in the past. To use this you need the driver version
2002-01-08 or higher (with the new firmware supporting the "Link Layer" protocol).
- Added an EPG bugfix that moves the Subtitle data to the Extended Description in
case the latter is empty and the Subtitle exceeds some useful length.
- Since several channels put very long strings into the Subtitle part of their
EPG data, that string is now limited in length when used in a recording's
file name.
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/recording.c b/recording.c index ba85ded..e14bb43 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.70 2002/10/20 11:54:29 kls Exp $ + * $Id: recording.c 1.72 2003/01/06 15:36:12 kls Exp $ */ #include "recording.h" @@ -58,6 +58,8 @@ #define TIMERMACRO_TITLE "TITLE" #define TIMERMACRO_EPISODE "EPISODE" +#define MAX_SUBTITLE_LENGTH 40 + void RemoveDeletedRecordings(void) { static time_t LastRemoveCheck = 0; @@ -306,10 +308,17 @@ cRecording::cRecording(cTimer *Timer, const char *Title, const char *Subtitle, c fileName = NULL; name = NULL; // set up the actual name: + const char *OriginalSubtitle = Subtitle; + char SubtitleBuffer[MAX_SUBTITLE_LENGTH]; if (isempty(Title)) Title = Timer->Channel()->Name(); if (isempty(Subtitle)) Subtitle = " "; + else if (strlen(Subtitle) > MAX_SUBTITLE_LENGTH) { + // let's make sure the Subtitle doesn't produce too long a file name: + strn0cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH); + Subtitle = SubtitleBuffer; + } char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE); char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE); if (macroTITLE || macroEPISODE) { @@ -333,6 +342,7 @@ cRecording::cRecording(cTimer *Timer, const char *Title, const char *Subtitle, c // handle summary: summary = !isempty(Timer->Summary()) ? strdup(Timer->Summary()) : NULL; if (!summary) { + Subtitle = OriginalSubtitle; if (isempty(Subtitle)) Subtitle = ""; if (isempty(Summary)) @@ -758,7 +768,7 @@ void cRecordingUserCommand::InvokeCommand(const char *State, const char *Recordi #define MAXINDEXCATCHUP 2 // seconds // The minimum age of an index file for considering it no longer to be written: -#define MININDEXAGE 10 // seconds +#define MININDEXAGE 60 // seconds cIndexFile::cIndexFile(const char *FileName, bool Record) :resumeFile(FileName) |