diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-05-09 16:54:35 +0200 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-05-09 16:54:35 +0200 |
commit | ea7e60395beaa885b6c6f8fcf86899412cab8199 (patch) | |
tree | ea1b7316bd1956439250ec797013ce192cb0baf1 | |
parent | 9b91e6882c17955d4e48e5d0a7f250f559cf5359 (diff) | |
download | vdr-plugin-eepg-ea7e60395beaa885b6c6f8fcf86899412cab8199.tar.gz vdr-plugin-eepg-ea7e60395beaa885b6c6f8fcf86899412cab8199.tar.bz2 |
change conditions
-rw-r--r-- | epghandler.c | 27 | ||||
-rw-r--r-- | epghandler.h | 2 |
2 files changed, 16 insertions, 13 deletions
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; } diff --git a/epghandler.h b/epghandler.h index 1dee4f2..fd4911e 100644 --- a/epghandler.h +++ b/epghandler.h @@ -9,7 +9,7 @@ #define CEEPGHANDLER_H_ #include <vdr/epg.h> -class cEEpgHandler : public cEpgDataReader { +class cEEpgHandler : public cEpgHandler { public: cEEpgHandler(); virtual ~cEEpgHandler(); |