diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2001-09-23 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2001-09-23 18:00:00 +0200 |
commit | 66bab90b60048a46e401ea506d3aa65c43779700 (patch) | |
tree | 376b0ed146b41a61eb6a8910d03fdcb7621aa78d /eit.c | |
parent | 156831036e9b0fcbfc719033cc89e08c1985cad6 (diff) | |
download | vdr-patch-lnbsharing-66bab90b60048a46e401ea506d3aa65c43779700.tar.gz vdr-patch-lnbsharing-66bab90b60048a46e401ea506d3aa65c43779700.tar.bz2 |
Version 0.96vdr-0.96
- Made VDR compile with libdvdread-0.9.1 (thanks to Andreas Schultz).
Note that you now _need_ version 0.9.1 of libdvdread to compile VDR with
DVD support!
- Several fixes to the replay mode display (thanks to Stefan Huelswitt):
no more replay mode display when pressing the "Green" or "Yellow" button
(Skip +/-60s); fixed timeout when pressing '0' to set an editing mark while
the progress display is not shown; mode display is shown after progress
display is closed; pressing "Ok" while the mode display is on brings up
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.
- EPG info is now updated if the contents changes but the ID remains the same.
- Fixed handling SVDRP commands whith more than one blank between the command
word and the options.
- The current volume setting is now saved to setup.conf and restored at the
next program start.
- New command line option '-r' to define a command that gets called before and
after each recording (see INSTALL for details).
- Implemented a check to see whether the system time is running linearly.
- Writing the current time (as seen by VDR) into the log file when starting
a timer recording (this may help debugging cases where timers don't start
at the expected time).
- Made the volume, mute and power keys work when a menu is active, too (thanks
to Matthias Weingart).
Diffstat (limited to 'eit.c')
-rw-r--r-- | eit.c | 105 |
1 files changed, 41 insertions, 64 deletions
@@ -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.24 2001/09/22 13:07:21 kls Exp $ ***************************************************************************/ #include "eit.h" @@ -279,59 +279,19 @@ unsigned short cEventInfo::GetEventID() const return uEventID; } /** */ -bool cEventInfo::SetTitle(const char *string) +void cEventInfo::SetTitle(const char *string) { - if (string == NULL) - return false; - - pTitle = strdup(string); - if (pTitle == NULL) - return false; - - return true; + pTitle = strcpyrealloc(pTitle, string); } /** */ -bool cEventInfo::SetSubtitle(const char *string) +void cEventInfo::SetSubtitle(const char *string) { - if (string == NULL) - return false; - - pSubtitle = strdup(string); - if (pSubtitle == NULL) - return false; - - return true; + pSubtitle = strcpyrealloc(pSubtitle, string); } /** */ -bool cEventInfo::AddExtendedDescription(const char *string) +void cEventInfo::SetExtendedDescription(const char *string) { - int size = 0; - bool first = true; - char *p; - - if (string == NULL) - return false; - - if (pExtendedDescription) - { - first = false; - size += strlen(pExtendedDescription); - } - - size += (strlen(string) + 1); - - p = (char *)realloc(pExtendedDescription, size); - if (p == NULL) - return false; - - if (first) - *p = 0; - - strcat(p, string); - - pExtendedDescription = p; - - return true; + pExtendedDescription = strcpyrealloc(pExtendedDescription, string); } /** */ void cEventInfo::SetTime(time_t t) @@ -447,6 +407,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; @@ -767,28 +743,29 @@ int cEIT::ProcessEIT(unsigned char *buffer) } pEvent = (cEventInfo *)pSchedule->GetEvent((unsigned short)VdrProgramInfo->EventID); if (!pEvent) { + // If we don't have that event ID yet, we create a new one. + // Otherwise we copy the information into the existing event anyway, because the data might have changed. pSchedule->Events.Add(new cEventInfo(VdrProgramInfo->ServiceID, VdrProgramInfo->EventID)); pEvent = (cEventInfo *)pSchedule->GetEvent((unsigned short)VdrProgramInfo->EventID); if (!pEvent) break; - if (rEvent) { - pEvent->SetTitle(rEvent->GetTitle()); - pEvent->SetSubtitle(rEvent->GetSubtitle()); - pEvent->SetTime(VdrProgramInfo->StartTime); - pEvent->SetDuration(VdrProgramInfo->Duration); - pEvent->AddExtendedDescription(rEvent->GetExtendedDescription()); - pEvent->FixEpgBugs(); - } - else { - pEvent->SetTitle(VdrProgramInfo->ShortName); - pEvent->SetSubtitle(VdrProgramInfo->ShortText); - pEvent->SetTime(VdrProgramInfo->StartTime); - pEvent->SetDuration(VdrProgramInfo->Duration); - pEvent->AddExtendedDescription(VdrProgramInfo->ExtendedName); - pEvent->AddExtendedDescription(VdrProgramInfo->ExtendedText); - pEvent->FixEpgBugs(); - } } + if (rEvent) { + pEvent->SetTitle(rEvent->GetTitle()); + pEvent->SetSubtitle(rEvent->GetSubtitle()); + pEvent->SetExtendedDescription(rEvent->GetExtendedDescription()); + } + else { + pEvent->SetTitle(VdrProgramInfo->ShortName); + pEvent->SetSubtitle(VdrProgramInfo->ShortText); + pEvent->SetExtendedDescription(VdrProgramInfo->ExtendedName); + //XXX kls 2001-09-22: + //XXX apparently this never occurred, so I have simpified ExtendedDescription handling + //XXX pEvent->AddExtendedDescription(VdrProgramInfo->ExtendedText); + } + pEvent->SetTime(VdrProgramInfo->StartTime); + pEvent->SetDuration(VdrProgramInfo->Duration); + pEvent->FixEpgBugs(); if (IsPresentFollowing()) { if ((GetRunningStatus(VdrProgramInfo->Status) == RUNNING_STATUS_PAUSING) || (GetRunningStatus(VdrProgramInfo->Status) == RUNNING_STATUS_RUNNING)) pSchedule->SetPresentEvent(pEvent); |