Removing unnecessary double quotes from EPG Subtitle in EPGBugfixLevel >=1

This commit is contained in:
Klaus Schmidinger 2001-09-22 10:28:33 +02:00
parent 772c515d6a
commit 935cfc2683
2 changed files with 18 additions and 1 deletions

View File

@ -772,3 +772,4 @@ Video Disk Recorder Revision History
the progress display; no more unnecessary display of "normal play mode".
- Supplying the new frontend parameter 'Inversion' (currently it is always
set to INVERSION_AUTO, which should work with all channels on Astra).
- Removing unnecessary double quotes from EPG Subtitle in EPGBugfixLevel >=1.

18
eit.c
View File

@ -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.22 2001/08/19 14:44:32 kls Exp $
* $Id: eit.c 1.23 2001/09/22 10:28:33 kls Exp $
***************************************************************************/
#include "eit.h"
@ -447,6 +447,22 @@ void cEventInfo::FixEpgBugs(void)
pSubtitle = NULL;
}
// ZDF.info puts the Subtitle between double quotes, which is nothing
// but annoying (some even put a '.' after the closing '"'):
//
// Title
// "Subtitle"[.]
//
if (pSubtitle && *pSubtitle == '"') {
int l = strlen(pSubtitle);
if (l > 2 && (pSubtitle[l - 1] == '"' || (pSubtitle[l - 1] == '.' && pSubtitle[l - 2] == '"'))) {
memmove(pSubtitle, pSubtitle + 1, l);
char *p = strrchr(pSubtitle, '"');
if (p)
*p = 0;
}
}
if (Setup.EPGBugfixLevel <= 1)
return;