From 48b12080740aee4e035d3b7412c4da4bf301315d Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Mon, 21 May 2012 19:44:32 +0200 Subject: disable EIT scan for NA so that the titles/descriptions are not erased, until the proper solution is made --- epghandler.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/epghandler.c b/epghandler.c index 29f092b..2e50c33 100644 --- a/epghandler.c +++ b/epghandler.c @@ -8,20 +8,24 @@ #include "epghandler.h" #if APIVERSNUM > 10725 #include "log.h" +#include cEEpgHandler::cEEpgHandler() { - // TODO Auto-generated constructor stub LogD(4, prep("cEEpgHandler()")); } cEEpgHandler::~cEEpgHandler() { - // TODO Auto-generated destructor stub } bool cEEpgHandler::HandleEitEvent(cSchedule* Schedule, const SI::EIT::Event* EitEvent, uchar TableID, uchar Version) { //LogD(1, prep("HandleEitEvent")); + //DISH NID 0x1001 to 0x100B BEV 0x100 and 0x101 + //TODO move the eit handling code at least for NA providers here instead of discarding. + int nid = Schedule->ChannelID().Nid(); + if ((nid >= 0x1001 && nid <= 0x100B) || nid == 0x101 || nid == 0x100) + return true; return false; // return true; } -- cgit v1.2.3 From d4733f1594ee1531693f5bd2bb759fa64d3cee73 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Wed, 23 May 2012 00:13:49 +0200 Subject: fix BEV eepg transponder --- eepg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eepg.c b/eepg.c index 1b7c0a2..f9e0daf 100644 --- a/eepg.c +++ b/eepg.c @@ -3854,7 +3854,7 @@ void cFilterEEPG::Process (u_short Pid, u_char Tid, const u_char * Data, int Len if (((Source() == cSource::FromString("S119.0W") && Transponder() == cChannel::Transponder(12472,'H')) || (Source() == cSource::FromString("S91.0W") - && Transponder() == cChannel::Transponder(12224,'R'))) + && Transponder() == cChannel::Transponder(12224,'V'))) && !UnprocessedFormat[DISH_BEV]) { UnprocessedFormat[DISH_BEV] = stream.getPid (); } -- cgit v1.2.3 From f16623ebfdab035c9baea1f20041fc63a0f98ef3 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Wed, 30 May 2012 17:39:22 +0200 Subject: add category and genere to the description usable with epgsearch move dish category and theme to the description change MHW2 delimiter --- eepg.c | 62 +++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/eepg.c b/eepg.c index f9e0daf..255a7fb 100644 --- a/eepg.c +++ b/eepg.c @@ -1343,7 +1343,7 @@ int cFilterEEPG::GetThemesMHW2 (const u_char * Data, int Length) if (Length >= (pSubThemeName + lenSubThemeName)) if (lenSubThemeName > 0) if ((lenThemeName + lenSubThemeName + 2) < 256) { - Themes[pThemeId][lenThemeName] = ' '; + Themes[pThemeId][lenThemeName] = '-'; decodeText2(&Data[pSubThemeName],lenSubThemeName,(char*)&Themes[pThemeId][lenThemeName + 1],256); //memcpy (&Themes[pThemeId][lenThemeName + 1], &Data[pSubThemeName], lenSubThemeName); } @@ -1594,13 +1594,44 @@ void cFilterEEPG::WriteToSchedule (cSchedule * ps[MAX_EQUIVALENCES], unsigned sh } Asprintf (&tmp, "%s - %d\'", Themes[ThemeId], Duration); Event->SetShortText (tmp); + free(tmp); //strreplace(t, '|', '\n'); if (SummText != 0x00) { WrittenSummary = true; CleanString ((uchar *) SummText); + + //Add themes and categories epgsearch style + char *theme; + Asprintf (&theme, "%s", Themes[ThemeId]); + if (theme && 0 != strcmp(theme,"")) { + char *category, *genre; + category = NULL; + genre = NULL; + char *split = strchr(theme, '-'); // Look for '-' delim to separate category from genre + if (split){ + *split = 0; + category = theme; + genre = (split[1] == 0x20) ? split + 2 : split + 1; + }else{ + category = theme; + } + string fmt; + fmt = "%s"; + if (stripspace(category)) { + fmt += "\nCategory: %s"; + } + if (genre) { + fmt += "\nGenre: %s"; + } + Asprintf (&tmp, fmt.c_str(), SummText, category, stripspace (genre)); + + Event->SetDescription (tmp); + free(tmp); + free(theme); + } + else Event->SetDescription (SummText); } - free (tmp); if (newEvent) ps[eq]->AddEvent (newEvent); //newEvent->FixEpgBugs (); causes segfault @@ -3415,26 +3446,20 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat pEvent->SetTitle(DishEventDescriptor->getName()); //LogD(2, prep("channelID: %s DishTitle: %s"), *channel->GetChannelID().ToString(), DishShortEventDescriptor->getText()); // pEvent->SetDescription(DishExtendedEventDescriptor->getText()); + pEvent->SetShortText(DishEventDescriptor->getShortText()); char *tmp; string fmt; + fmt = "%s"; - if (0 != strcmp(DishEventDescriptor->getShortText(),"") && DishEventDescriptor->hasTheme()) { - fmt += " - "; + if (DishEventDescriptor->hasTheme()) { + fmt += "\nTheme: "; } fmt += "%s"; - if (DishEventDescriptor->hasTheme() && DishEventDescriptor->hasCategory()) { - fmt += " ~ "; + if (DishEventDescriptor->hasCategory()) { + fmt += "\nCategory: "; } fmt += "%s"; - Asprintf (&tmp, fmt.c_str(), DishEventDescriptor->getShortText() - , DishEventDescriptor->getTheme() - , DishEventDescriptor->getCategory()); - pEvent->SetShortText(tmp); - //LogD(2, prep("EEPGDEBUG:DishTheme:%x-DishCategory:%x)"), DishTheme, DishCategory); - free(tmp); - - fmt = "%s"; if (0 != strcmp(DishEventDescriptor->getDescription(),"") && (0 != strcmp(DishEventDescriptor->getRating(),"") || 0 != strcmp(DishEventDescriptor->getStarRating(),""))) { @@ -3453,11 +3478,10 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat } Asprintf (&tmp, fmt.c_str(), DishEventDescriptor->getDescription() - , DishEventDescriptor->getRating() - , DishEventDescriptor->getStarRating() - , DishEventDescriptor->getProgramId() - , DishEventDescriptor->getSeriesId() - , orgAirDate == 0 || !dateok ? "" : datestr); + , DishEventDescriptor->getTheme(), DishEventDescriptor->getCategory() + , DishEventDescriptor->getRating(), DishEventDescriptor->getStarRating() + , DishEventDescriptor->getProgramId(), DishEventDescriptor->getSeriesId() + , orgAirDate == 0 || !dateok ? "" : datestr); pEvent->SetDescription(tmp); free(tmp); -- cgit v1.2.3 From 1992a450ccd4780a36f8d4e1a2433aa84de1baab Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Fri, 1 Jun 2012 15:36:47 +0200 Subject: fix BEV description --- eepg.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/eepg.c b/eepg.c index 255a7fb..ae358e9 100644 --- a/eepg.c +++ b/eepg.c @@ -3444,12 +3444,17 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat if (DishEventDescriptor) { if (DishEventDescriptor->getName()) pEvent->SetTitle(DishEventDescriptor->getName()); - //LogD(2, prep("channelID: %s DishTitle: %s"), *channel->GetChannelID().ToString(), DishShortEventDescriptor->getText()); - // pEvent->SetDescription(DishExtendedEventDescriptor->getText()); + //LogD(2, prep("channelID: %s DishTitle: %s"), *channel->GetChannelID().ToString(), DishEventDescriptor->getName()); pEvent->SetShortText(DishEventDescriptor->getShortText()); char *tmp; string fmt; + const char * description = DishEventDescriptor->getDescription(); + //BEV sets the description previously with ExtendedEventDescriptor + if (0 == strcmp(DishEventDescriptor->getDescription(),"") && pEvent->Description()) + description = pEvent->Description(); + + fmt = "%s"; if (DishEventDescriptor->hasTheme()) { fmt += "\nTheme: "; @@ -3460,8 +3465,7 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat } fmt += "%s"; - if (0 != strcmp(DishEventDescriptor->getDescription(),"") - && (0 != strcmp(DishEventDescriptor->getRating(),"") + if ((0 != strcmp(DishEventDescriptor->getRating(),"") || 0 != strcmp(DishEventDescriptor->getStarRating(),""))) { fmt += "\n\nRating: "; } @@ -3477,7 +3481,7 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat dateok = strftime (datestr,80," Original Air Date: %a %b %d %Y",gmtime(&orgAirDate)) > 0; } - Asprintf (&tmp, fmt.c_str(), DishEventDescriptor->getDescription() + Asprintf (&tmp, fmt.c_str(), description , DishEventDescriptor->getTheme(), DishEventDescriptor->getCategory() , DishEventDescriptor->getRating(), DishEventDescriptor->getStarRating() , DishEventDescriptor->getProgramId(), DishEventDescriptor->getSeriesId() @@ -3486,8 +3490,8 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat free(tmp); - //LogD(2, prep("DishDescription: %s"), DishExtendedEventDescriptor->getText()); - //LogD(2, prep("DishShortText: %s"), DishExtendedEventDescriptor->getShortText()); + //LogD(2, prep("DishDescription: %s"), DishEventDescriptor->getDescription()); + //LogD(2, prep("DishShortText: %s"), DishEventDescriptor->getShortText()); } } -- cgit v1.2.3