mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Any newline characters in the 'description' of EPG events are now preserved
This commit is contained in:
parent
6dd6aea940
commit
1fd16f6629
3
HISTORY
3
HISTORY
@ -2733,3 +2733,6 @@ Video Disk Recorder Revision History
|
|||||||
- Taking the Sid into account when detecting version changes in processing the
|
- Taking the Sid into account when detecting version changes in processing the
|
||||||
PMT (thanks to Stéphane Esté-Gracias for pointing out this problem).
|
PMT (thanks to Stéphane Esté-Gracias for pointing out this problem).
|
||||||
- Completed the Russian OSD texts (thanks to Vyacheslav Dikonov).
|
- Completed the Russian OSD texts (thanks to Vyacheslav Dikonov).
|
||||||
|
- Any newline characters in the 'description' of EPG events are now preserved
|
||||||
|
to allow texts to be displayed the way the tv stations have formatted them.
|
||||||
|
This was also necessary to better display itemized texts.
|
||||||
|
16
epg.c
16
epg.c
@ -7,7 +7,7 @@
|
|||||||
* Original version (as used in VDR before 1.3.0) written by
|
* Original version (as used in VDR before 1.3.0) written by
|
||||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||||
*
|
*
|
||||||
* $Id: epg.c 1.16 2004/03/06 14:33:22 kls Exp $
|
* $Id: epg.c 1.17 2004/03/13 12:41:24 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "epg.h"
|
#include "epg.h"
|
||||||
@ -151,8 +151,11 @@ void cEvent::Dump(FILE *f, const char *Prefix) const
|
|||||||
fprintf(f, "%sT %s\n", Prefix, title);
|
fprintf(f, "%sT %s\n", Prefix, title);
|
||||||
if (!isempty(shortText))
|
if (!isempty(shortText))
|
||||||
fprintf(f, "%sS %s\n", Prefix, shortText);
|
fprintf(f, "%sS %s\n", Prefix, shortText);
|
||||||
if (!isempty(description))
|
if (!isempty(description)) {
|
||||||
|
strreplace(description, '\n', '|');
|
||||||
fprintf(f, "%sD %s\n", Prefix, description);
|
fprintf(f, "%sD %s\n", Prefix, description);
|
||||||
|
strreplace(description, '|', '\n');
|
||||||
|
}
|
||||||
if (vps)
|
if (vps)
|
||||||
fprintf(f, "%sV %ld\n", Prefix, vps);
|
fprintf(f, "%sV %ld\n", Prefix, vps);
|
||||||
fprintf(f, "%se\n", Prefix);
|
fprintf(f, "%se\n", Prefix);
|
||||||
@ -191,8 +194,10 @@ bool cEvent::Read(FILE *f, cSchedule *Schedule)
|
|||||||
case 'S': if (Event)
|
case 'S': if (Event)
|
||||||
Event->SetShortText(t);
|
Event->SetShortText(t);
|
||||||
break;
|
break;
|
||||||
case 'D': if (Event)
|
case 'D': if (Event) {
|
||||||
|
strreplace(t, '|', '\n');
|
||||||
Event->SetDescription(t);
|
Event->SetDescription(t);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'V': if (Event)
|
case 'V': if (Event)
|
||||||
Event->SetVps(atoi(t));
|
Event->SetVps(atoi(t));
|
||||||
@ -287,11 +292,10 @@ void ReportEpgBugFixStats(bool Reset)
|
|||||||
|
|
||||||
void cEvent::FixEpgBugs(void)
|
void cEvent::FixEpgBugs(void)
|
||||||
{
|
{
|
||||||
// VDR can't usefully handle newline characters in the EPG data, so let's
|
// VDR can't usefully handle newline characters in the title and shortText of EPG
|
||||||
// always convert them to blanks (independent of the setting of EPGBugfixLevel):
|
// data, so let's always convert them to blanks (independent of the setting of EPGBugfixLevel):
|
||||||
strreplace(title, '\n', ' ');
|
strreplace(title, '\n', ' ');
|
||||||
strreplace(shortText, '\n', ' ');
|
strreplace(shortText, '\n', ' ');
|
||||||
strreplace(description, '\n', ' ');
|
|
||||||
// Same for control characters:
|
// Same for control characters:
|
||||||
strreplace(title, '\x86', ' ');
|
strreplace(title, '\x86', ' ');
|
||||||
strreplace(title, '\x87', ' ');
|
strreplace(title, '\x87', ' ');
|
||||||
|
Loading…
Reference in New Issue
Block a user