From 19dedfa5c5318dc9c2824a859a2bd0395766e96c Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Fri, 18 Feb 2011 20:35:29 +0200 Subject: Added Perl compatible regular expression filtering into the recordings menu. --- Makefile | 2 ++ README | 2 +- pages/recordings.ecpp | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a6602db..e9fe05e 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,8 @@ TNTVERS7 = $(shell ver=$(TNTVERSION); if [ $$ver -ge "1606" ]; then echo "yes" CXXFLAGS += $(shell tntnet-config --cxxflags) LIBS += $(shell tntnet-config --libs) +CXXFLAGS += $(shell pcre-config --cflags) +LIBS += $(shell pcre-config --libs-cpp) ### The name of the distribution archive: diff --git a/README b/README index 642af84..5372ee9 100644 --- a/README +++ b/README @@ -55,7 +55,7 @@ VDR >= 1.4.0-2 gcc >= 3.1 if gcc < 4.0: boost >= 1.32.0 - http://www.boost.org - +PCRE >= 8.0 - http://www.pcre.org/ Tntnet >= 1.5.3 - http://www.tntnet.org/download.hms Cxxtools >= 1.4.3 - http://www.tntnet.org/download.hms diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index f256a0b..48455dd 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -1,5 +1,6 @@ <%pre> #include +#include #include #include @@ -25,6 +26,7 @@ using namespace std; string sort; string todel; string diskinfo; + string filter; string deletions[]; <%session scope="global"> @@ -103,10 +105,13 @@ if (!deleteResult.empty()) {
    -<& recordings.recordings_item &> +<& recordings.recordings_item filter=(filter) &>
-
+
+ + +
<%cpp> } @@ -120,6 +125,7 @@ if (!deleteResult.empty()) { <%def recordings_item> <%args> + filter; path[]; int level = 0; @@ -156,6 +162,7 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { } recItemParams.add("path", recItem->Name()); recItemParams.add("level", lexical_cast(level + 1)); + recItemParams.add("filter", filter);