mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added an EPG bugfix for too long Subtitles and empty Extended Description
This commit is contained in:
parent
4e15f6d658
commit
4b1440737a
2
HISTORY
2
HISTORY
@ -1911,3 +1911,5 @@ Video Disk Recorder Revision History
|
||||
- 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-06 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.
|
||||
|
20
eit.c
20
eit.c
@ -16,7 +16,7 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* $Id: eit.c 1.62 2003/01/06 14:10:37 kls Exp $
|
||||
* $Id: eit.c 1.63 2003/01/06 15:05:46 kls Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "eit.h"
|
||||
@ -399,8 +399,8 @@ bool cEventInfo::Read(FILE *f, cSchedule *Schedule)
|
||||
return false;
|
||||
}
|
||||
|
||||
#define MAXEPGBUGFIXSTATS 6
|
||||
#define MAXEPGBUGFIXCHANS 50
|
||||
#define MAXEPGBUGFIXSTATS 7
|
||||
#define MAXEPGBUGFIXCHANS 100
|
||||
struct tEpgBugFixStats {
|
||||
int hits;
|
||||
int n;
|
||||
@ -597,6 +597,20 @@ void cEventInfo::FixEpgBugs(void)
|
||||
}
|
||||
}
|
||||
|
||||
#define MAX_USEFUL_SUBTITLE_LENGTH 40
|
||||
// Some channels put a whole lot of information in the Subtitle and leave
|
||||
// the Extended Description totally empty. So if the Subtitle length exceeds
|
||||
// MAX_USEFUL_SUBTITLE_LENGTH, let's put this into the Extended Description
|
||||
// instead:
|
||||
if (!isempty(pSubtitle) && isempty(pExtendedDescription)) {
|
||||
if (strlen(pSubtitle) > MAX_USEFUL_SUBTITLE_LENGTH) {
|
||||
free(pExtendedDescription);
|
||||
pExtendedDescription = pSubtitle;
|
||||
pSubtitle = NULL;
|
||||
EpgBugFixStat(5, GetChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
// Some channels use the ` ("backtick") character, where a ' (single quote)
|
||||
// would be normally used. Actually, "backticks" in normal text don't make
|
||||
// much sense, so let's replace them:
|
||||
|
Loading…
Reference in New Issue
Block a user