summaryrefslogtreecommitdiff
path: root/xmltv2vdr.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2012-07-14 17:39:18 +0200
committerJochen Dolze <vdr@dolze.de>2012-07-14 17:39:18 +0200
commit296d7f6785053232c21c747138c2673be19ac6bd (patch)
tree40c8364e7a8687c1a9884209d5bf999ff2cc4e86 /xmltv2vdr.cpp
parentade2efec3a2e857e56dfcd42b0068d1de3bcfae7 (diff)
downloadvdr-plugin-xmltv2vdr-296d7f6785053232c21c747138c2673be19ac6bd.tar.gz
vdr-plugin-xmltv2vdr-296d7f6785053232c21c747138c2673be19ac6bd.tar.bz2
Fixed bug which prevents some events to get updates
Added better handling of two titles
Diffstat (limited to 'xmltv2vdr.cpp')
-rw-r--r--xmltv2vdr.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/xmltv2vdr.cpp b/xmltv2vdr.cpp
index d0cb078..45a76d7 100644
--- a/xmltv2vdr.cpp
+++ b/xmltv2vdr.cpp
@@ -519,8 +519,8 @@ bool cEPGHandler::HandleEvent(cEvent* Event)
}
source=sources->GetSource(EITSOURCE);
if (!source) tsyslog("no source for %s",EITSOURCE);
- bool useeptext=((epall & EPLIST_USE_TEXT)==EPLIST_USE_TEXT);
- if (useeptext) Flags|=(USE_SHORTTEXT|USE_TITLE);
+ bool useeptext=((epall & EPLIST_USE_STEXTITLE)==EPLIST_USE_STEXTITLE);
+ if (useeptext) Flags|=(USE_SHORTTEXT|OPT_SEASON_STEXTITLE);
xevent=import.AddXMLTVEvent(source,db,ChannelID,Event,Event->Description(),useeptext);
if (!xevent)
{
@@ -584,20 +584,23 @@ void cEPGTimer::Action()
sqlite3 *db=NULL;
cEPGSource *source=sources->GetSource(EITSOURCE);
- bool useeptext=((epall & EPLIST_USE_TEXT)==EPLIST_USE_TEXT);
+ bool useeptext=((epall & EPLIST_USE_STEXTITLE)==EPLIST_USE_STEXTITLE);
int Flags=USE_SEASON;
- if (useeptext) Flags|=(USE_SHORTTEXT|USE_TITLE);
+ if (useeptext) Flags|=(USE_SHORTTEXT|OPT_SEASON_STEXTITLE);
for (cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer))
{
if (Timer->Recording()) continue; // to late ;)
cEvent *event=(cEvent *) Timer->Event();
if (!event) continue;
- if (!event->ShortText() && !event->Description()) continue; // no text -> no episode
- if (event->ShortText() && event->Description())
+ if (!useeptext)
{
- if ((strlen(event->ShortText())+strlen(event->Description()))==0) continue; // no text -> no episode
+ if (!event->ShortText() && !event->Description()) continue; // no text -> no episode
+ if (event->ShortText() && event->Description())
+ {
+ if ((strlen(event->ShortText())+strlen(event->Description()))==0) continue; // no text -> no episode
+ }
}
- if (maps->ProcessChannel(event->ChannelID())) continue; // already processed by xmltv2vdr
+ if (maps->ProcessChannel(event->ChannelID()) && event->ShortText()) continue; // already processed by xmltv2vdr
const char *ChannelID=strdup(*event->ChannelID().ToString());
cXMLTVEvent *xevent=import.SearchXMLTVEvent(&db,ChannelID,event);
@@ -610,6 +613,13 @@ void cEPGTimer::Action()
continue;
}
}
+ else
+ {
+ if (!event->ShortText() && event->Description())
+ {
+ import.AddShortTextFromEITDescription(xevent,event->Description());
+ }
+ }
free((void*)ChannelID);
import.PutEvent(source,db,NULL,event,xevent,Flags);