]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
eit: use 'pcre' defines as common
authorJaroslav Kysela <perex@perex.cz>
Thu, 21 Dec 2017 08:35:06 +0000 (09:35 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 21 Dec 2017 08:35:08 +0000 (09:35 +0100)
- identify older pcre library as "pcre1"
- use "pcre" json maps as common (shared for both pcre/pcre2 libraries)

data/conf/epggrab/eit/scrape/uk
src/epggrab/module/eitpatternlist.c
src/tvhregex.h
support/eitscrape_test.py

index b412318a68faa7df2741abbd6a7ff42757f33014..d7286ba47dc8b2241e7e5cc5f4715c3bdf2eaa3c 100644 (file)
       "scrape_subtitle": [
           "^(?:[.][.][.][^:.]*[.:] +|[0-9]+/[0-9]+[.] +)?([^.0-9][^:]*): "
       ]
-  },
-  "pcre2": {
-      "scrape_subtitle": [
-          "^(?:[.][.][.][^:.]*[.:] +|[0-9]+/[0-9]+[.] +)?([^.0-9][^:]*): "
-      ]
   }
 }
index 787072a1b3fba5878a727fba9a8893bbca99eb40..e066c1bb675a9f5c0670c3fc64776df079d18ffb 100644 (file)
@@ -50,6 +50,8 @@ void eit_pattern_compile_named_list ( eit_pattern_list_t *list, htsmsg_t *m, con
 {
 #if defined(TVHREGEX_TYPE)
   htsmsg_t *m_alt = htsmsg_get_map(m, TVHREGEX_TYPE);
+  if (!m_alt)
+    m_alt = htsmsg_get_map(m, "pcre");
   if (m_alt) {
     htsmsg_t *res = htsmsg_get_list(m_alt, key);
     if (res) {
index 5c698eac3bfee9fe168627e500b69a46f3888b99..b7b8ec1d33812481d203cc0e91dc379ad559eb35 100644 (file)
@@ -26,7 +26,7 @@
 #  define PCRE_STUDY_JIT_COMPILE 0
 #  endif
 
-#define TVHREGEX_TYPE           "pcre"
+#define TVHREGEX_TYPE           "pcre1"
 
 #elif ENABLE_PCRE2
 
index 11ceb66cf97bfb869e2f8690dd023e1b2c370682..a38d0ef94384fe282068bfd29a0eefdf11121bf3 100755 (executable)
@@ -134,7 +134,10 @@ def main(argv):
   group = parser.add_mutually_exclusive_group()
   group.add_argument('--pcre', dest='engine',
                      action='store_const', const='pcre',
-                     help='test PCRE regular expressions if available')
+                     help='test PCRE common regular expressions if available')
+  group.add_argument('--pcre1', dest='engine',
+                     action='store_const', const='pcre1',
+                     help='test PCRE1 regular expressions if available')
   group.add_argument('--pcre2', dest='engine',
                      action='store_const', const='pcre2',
                      help='test PCRE2 regular expressions if available')