diff options
author | Jochen Dolze <vdr@dolze.de> | 2011-07-29 18:53:00 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2011-07-29 18:53:00 +0200 |
commit | 95a84da5e1becd28517e2b71341ea994cdeae828 (patch) | |
tree | 230ab5de9a3964efea2fe78534c82207bed7ec6e | |
parent | 5fa384d802844c08716d786dc2039e35a17286c7 (diff) | |
download | vdr-plugin-xmltv2vdr-95a84da5e1becd28517e2b71341ea994cdeae828.tar.gz vdr-plugin-xmltv2vdr-95a84da5e1becd28517e2b71341ea994cdeae828.tar.bz2 |
Added more error info when xmltv data overlaps
Added Makefile_ to build plugin with grabber
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | Makefile_ | 14 | ||||
-rw-r--r-- | dist/epgdata2xmltv/Makefile | 4 | ||||
-rw-r--r-- | parse.cpp | 18 |
4 files changed, 32 insertions, 13 deletions
@@ -51,7 +51,7 @@ PKG-INCLUDES += libxml-2.0 INCLUDES += -I$(VDRDIR)/include -DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -D_GNU_SOURCE -D_XOPEN_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES)) LIBS += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS)) @@ -105,13 +105,12 @@ i18n: $(I18Nmsgs) $(I18Npot) ### Targets: -#parse: parse.o -# $(CXX) $(CXXFLAGS) parse.o $(LIBS) -o parse - libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) +install: + dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @@ -121,4 +120,4 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot diff --git a/Makefile_ b/Makefile_ new file mode 100644 index 0000000..72424e7 --- /dev/null +++ b/Makefile_ @@ -0,0 +1,14 @@ +# +# Makefile +# +# +DIRS=dist/epgdata2xmltv . + +all: + for i in $(DIRS); do $(MAKE) -C $$i; done + +install: + for i in $(DIRS); do $(MAKE) -C $$i install; done + +clean: + for i in $(DIRS); do $(MAKE) -C $$i clean; done diff --git a/dist/epgdata2xmltv/Makefile b/dist/epgdata2xmltv/Makefile index 7c63b0c..2ff7f4e 100644 --- a/dist/epgdata2xmltv/Makefile +++ b/dist/epgdata2xmltv/Makefile @@ -60,10 +60,10 @@ epgdata2xmltv_xsl: sed -e "s/\"/\\\\\"/g;" epgdata2xmltv.xsl | awk '{ printf("%s",$$0); }' >> epgdata2xmltv_xsl.h echo "\";" >> epgdata2xmltv_xsl.h -epgdata2xmltv: $(OBJS) +epgdata2xmltv: epgdata2xmltv_xsl $(OBJS) $(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@ -install: epgdata2xmltv_xsl epgdata2xmltv +install: epgdata2xmltv @cp epgdata2xmltv $(INSTALL) $(STRIP) $(INSTALL)/epgdata2xmltv @mkdir -p /var/lib/epgsources @@ -431,26 +431,32 @@ bool cParse::PutEvent(cSchedule* schedule, cEvent *event, cXMLTVEvent *xevent, c { if ((map->Flags() & OPT_APPEND)==OPT_APPEND) { + start=xevent->StartTime(); /* checking the event sequence */ cEvent *last=NULL; if (schedule->Index()) last=schedule->Events()->Last(); if (last) { - if (xevent->StartTime()<last->StartTime()) + if (start<last->StartTime()) { - esyslog("xmltv2vdr: '%s' ERROR xmltv data overlaps",name); + esyslog("xmltv2vdr: '%s' ERROR xmltv data overlaps:",name); + time_t lstart=last->StartTime(); + esyslog("xmltv2vdr: '%s' ERROR last event '%s' @%s", name,last->Title(), + ctime(&lstart)); + esyslog("xmltv2vdr: '%s' ERROR next event '%s' @%s", name,xevent->Title(), + ctime(&start)); return false; } /* set duration, if it doesn't exist */ - if (!last->Duration()) last->SetDuration((int) difftime(xevent->StartTime(),last->StartTime())); - if (xevent->StartTime()!=last->EndTime()) + if (!last->Duration()) last->SetDuration((int) difftime(start, + last->StartTime())); + if (start!=last->EndTime()) { esyslog("xmltv2vdr: '%s' detected gap of %is between events",name, - (int) difftime(xevent->StartTime(),last->EndTime())); + (int) difftime(start,last->EndTime())); } } /* add event */ - start=xevent->StartTime(); event=new cEvent(xevent->EventID()); if (!event) return false; event->SetStartTime(start); |