From ea7e60395beaa885b6c6f8fcf86899412cab8199 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Wed, 9 May 2012 16:54:35 +0200 Subject: change conditions --- epghandler.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'epghandler.c') diff --git a/epghandler.c b/epghandler.c index b9057c1..68f68d5 100644 --- a/epghandler.c +++ b/epghandler.c @@ -20,8 +20,9 @@ cEEpgHandler::~cEEpgHandler() { bool cEEpgHandler::HandleEitEvent(cSchedule* Schedule, const SI::EIT::Event* EitEvent, uchar TableID, uchar Version) { - LogD(1, prep("HandleEitEvent")); - return true; + //LogD(1, prep("HandleEitEvent")); + return false; +// return true; } bool cEEpgHandler::SetEventID(cEvent* Event, tEventID EventID) { @@ -32,23 +33,25 @@ bool cEEpgHandler::SetEventID(cEvent* Event, tEventID EventID) { bool cEEpgHandler::SetTitle(cEvent* Event, const char* Title) { LogD(1, prep("Event id:%d title:%s new title:%s"), Event->EventID(), Event->Title(), Title); - if (!strcmp(Event->Title(),"") || (strcmp(Title,"") && strcmp(Event->Title(),Title))) - Event->SetTitle(Title); - return true; + if (!Event->Title() || Title && (!strcmp(Event->Title(),"") || (strcmp(Title,"") && strcmp(Event->Title(),Title)))) + Event->SetTitle(Title); + return true; } bool cEEpgHandler::SetShortText(cEvent* Event, const char* ShortText) { LogD(1, prep("Event id:%d ShortText:%s new ShortText:%s"), Event->EventID(), Event->ShortText(), ShortText); - if (!strcmp(Event->ShortText(),"") || (strcmp(ShortText,"") && strcmp(Event->ShortText(),ShortText))) - Event->SetShortText(ShortText); - return true; + if (!Event->ShortText() || ShortText && (!strcmp(Event->ShortText(),"") || (strcmp(ShortText,"") && strcmp(Event->ShortText(),ShortText)))) + Event->SetShortText(ShortText); + return true; } bool cEEpgHandler::SetDescription(cEvent* Event, const char* Description) { - if (!strcmp(Event->Description(),"") || (strcmp(Description,"") && strcmp(Event->Description(),Description))) - Event->SetDescription(Description); - return true; + LogD(1, prep("Event id:%d Description:%s new Description:%s"), Event->EventID(), Event->Description(), Description); + + if (!Event->Description() || Description && (!strcmp(Event->Description(),"") || (strcmp(Description,"") && strcmp(Event->Description(),Description)))) + Event->SetDescription(Description); + return true; } bool cEEpgHandler::SetContents(cEvent* Event, uchar* Contents) { @@ -77,7 +80,7 @@ bool cEEpgHandler::SetVps(cEvent* Event, time_t Vps) { } bool cEEpgHandler::HandleEvent(cEvent* Event) { - LogD(1, prep("HandleEvent")); + //LogD(1, prep("HandleEvent")); return true; } -- cgit v1.2.3