Jim Hague [Thu, 28 Dec 2017 11:16:50 +0000 (11:16 +0000)]
eit: update UK scrapers to use new facilities (#4818)
Refresh the UK scrapers to exploit recent mechanism changes. Add title
and summary scrapers, alternate PCRE patterns that offer a little more
sophistication, and make use of filter patterns to simplify matching a
little.
Jim Hague [Wed, 27 Dec 2017 14:55:02 +0000 (14:55 +0000)]
eit: allow scraper regexes to be marked as filters (#4818)
Introduce an extended scraper regex syntax; as well as a string, a regex
can be specified as a map. The map must have an entry "pattern" with the
regex pattern. It may also have an entry "filter", with a numeric value.
If this value is not 0, the regular expression is a filter.
If a filter regular expression matches the input text, the result of the
match replaces the input text, and processing continues from the next
regular expression with that new input text.
Jim Hague [Thu, 21 Dec 2017 10:47:22 +0000 (10:47 +0000)]
eit: rework EIT scraper test script and add POSIX matching (#4801)
Add support for new_title and new_summary test fields, and make adding new fields easier in the future.
Rework regex handling to carry regexp engine type info with the regex. The the PyPi package 'regex' is available, then use that and set its POSIX flag when evaluating POSIX regexes. This doesn't restrict the regex to POSIX-only expressions, but does do POSIX-style leftmost-longest matching, which is the significant behaviour different between PCRE and POSIX expressions.
Jim Hague [Sun, 17 Dec 2017 00:48:23 +0000 (00:48 +0000)]
eit: add title and summary scrapers (#4801)
Since this change adds a summary scraper, remove the recently added
summary update from the second match subgroup and instead build the
match from each scraper by concatenating all matching subgroups. This
lets us pick multiple items from the input.
Jim Hague [Sat, 16 Dec 2017 20:59:16 +0000 (20:59 +0000)]
eit: if PCRE/PCRE2 in use, regexes can be marked for Posix engine execution only (#4795)
If fancier regex engines are available, we need to be able to mark regexes
that should only ever be executed by the Posix engine, to make sure that
they will always work as expected.
If PCRE or PCRE2 is available, look for regexes specific to those. These
have the same name, but are under a map named "pcre" or "pcre2". If they
are not found, fall back to the top level Posix regexes, but make sure
these are executed by the Posix engine.
Jim Hague [Thu, 14 Dec 2017 14:15:11 +0000 (14:15 +0000)]
eit: extend generic regex handling for subpatterns and use in scraper regex (#4795)
Currently scraper regex usage is hardwired to Posix. Using PCRE/PCRE2 if
available would give more flexibility and potentially save repetition in
patterns, e.g.
(?:[.][.][.][:.]*[.:]|[0-9]+/[0-9]+[.])? ([^:]*):
would require multiple Posix patterns, each duplicating the captured
subpattern.
So add regex_match_substring() and regex_match_substring_length() to
the TVH regex interface. Also add a flags parameter to regex_compile(),
so caseless matching can be optionally requested, rather than hardwired
as at present (EIT scraper regex does not use caseless).
One small change to EIT scraper processing. If the match does not fit
into the buffer, it will be ignored, rather than (as at present)
truncated. This is slightly simpler to implement with PCRE2. I am not
convinced truncation is useful - or, for that matter, that trimming space
from the right hand end of match in the EIT scraper is necessary or
necessarily desirable, but I've left that in.
Bernd Kuhls [Mon, 18 Dec 2017 19:52:06 +0000 (20:52 +0100)]
sbuf: fix uclibc compilation error
Fixes build error
tvheadend-e06ffd87beff16103c47d6fa542df2374fca6fd3/src/sbuf.h:77:1:
error: unknown type name 'ssize_t'; did you mean 'size_t'?
ssize_t sbuf_read(sbuf_t *sb, int fd);
pablozg [Tue, 19 Dec 2017 11:18:07 +0000 (12:18 +0100)]
DVR: add new features
Now the autorec name is by default the epg title.
A new button to show / hidde the skipped recordings in the webui.
A new button to add as completed an upcoming recording to avoid record it again.
E.Smith [Tue, 21 Nov 2017 11:03:13 +0000 (11:03 +0000)]
xmltv: Use epggrab_module_int_t instead of ext_t. (#3753).
The epggrab_module_ext_t derives from the epggrab_module_int_t
so we should really use the epggrab_module_int_t to make it
clearer that the fields are in the base class.
E.Smith [Mon, 20 Nov 2017 22:36:43 +0000 (22:36 +0000)]
xmltv: Optionally disable mapping category to genre. (#3753).
Allow user to disable mapping from xmltv to genre. The mapping
is imprecise and often has numerous categories not mapped.
By not mapping to genres, some GUIs can pass through the
category instead.