summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2014-03-17 08:07:13 (GMT)
committerDimitar Petrovski <dimeptr@gmail.com>2014-03-17 08:07:13 (GMT)
commit6a6db913ac85b4144f3144ab50a7e6f89ef9640b (patch)
treeff655d60b24ca82bbfe7953cbff27d20cad87441
parentcbe347f60c34892382452580af39a55c550d9cb5 (diff)
downloadvdr-plugin-eepg-6a6db913ac85b4144f3144ab50a7e6f89ef9640b.tar.gz
vdr-plugin-eepg-6a6db913ac85b4144f3144ab50a7e6f89ef9640b.tar.bz2
Ipdated Makefile and skyuk shorttext extraction
-rw-r--r--Makefile31
-rw-r--r--eepg.c9
2 files changed, 36 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bf209b6..b07b767 100644
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,28 @@ export CXXFLAGS = $(call PKGCFG,cxxflags)
APIVERSION = $(call PKGCFG,apiversion)
+# backward compatibility with VDR version < 1.7.34
+API1733 := $(shell if [ "$(APIVERSION)" \< "1.7.34" ]; then echo true; fi; )
+
+ifdef API1733
+
+VDRSRC = $(VDRDIR)
+ifeq ($(strip $(VDRSRC)),)
+VDRSRC := ../../..
+endif
+LIBDIR = $(VDRSRC)/PLUGINS/lib
+
+ifndef NOCONFIG
+CXXFLAGS = $(call PKGCFG,cflags)
+CXXFLAGS += -fPIC
+else
+-include $(VDRSRC)/Make.global
+-include $(VDRSRC)/Make.config
+endif
+
+export CXXFLAGS
+endif
+
### Allow user defined options to overwrite defaults:
-include $(PLGCFG)
@@ -68,8 +90,9 @@ SOFILE = libvdr-$(PLUGIN).so
### Includes and Defines (add further entries here):
-#INCLUDES += -I$(VDRDIR)/include
-INCLUDES +=
+ifdef API1733
+INCLUDES += -I$(VDRDIR)/include
+endif
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
@@ -79,7 +102,11 @@ OBJS = $(PLUGIN).o dish.o epghandler.o setupeepg.o equivhandler.o util.o eit2.o
### The main target:
+ifdef API1733
+all: libvdr-$(PLUGIN).so i18n
+else
all: $(SOFILE) i18n
+endif
### Implicit rules:
diff --git a/eepg.c b/eepg.c
index ac2f9fa..10e966e 100644
--- a/eepg.c
+++ b/eepg.c
@@ -2508,8 +2508,13 @@ int cFilterEEPG::GetSummariesSKYBOX (const u_char * Data, int Length)
CleanString (S->Text);
char * delim = strstr ( (char *)S->Text, STxtDelim );
//S->ShortTextLength = delim == NULL ? 0 : delim - (char *)S->Text;
- if (Format == SKY_UK && !delim && strncmp((char *)S->Text,"...",3) == 0)
- delim = strstr ( (char *)(S->Text+3), "." );
+ if (Format == SKY_UK && !delim && strncmp((char *)S->Text,"..",2) == 0) {
+ char * tdlm = strpbrk ( (char *)(S->Text+3), ".?!" );
+ if (tdlm && tdlm[0] != '.')
+ tdlm++;
+ if (tdlm)
+ delim = tdlm;
+ }
int shLen = delim - (char *)S->Text;
S->ShortTextLength = delim == NULL || shLen > numeric_limits<u_char>::max() ? 0 : shLen;
LogI(4, prep("EventId %08x Summnr %d:%.30s."), S->EventId, nSummaries, S->Text);