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.
Jim Hague [Wed, 13 Dec 2017 21:37:00 +0000 (21:37 +0000)]
eit: Add optional 2nd match subexpression for subtitle (#4791)
If the regex for the subtitle contains a second subexpression, and a
match is made, use the first subexpression for the subtitle and replace
the summary with the second subexpression.
For example, a UK Freeview subtitle regex might choose, when matching a
summary 'Subtitle: Text', to set the subtitle to 'Subtitle' and set the
summary to 'Text' to avoid repetition of the subtitle.
Update the scraper test script to support a test field 'new_summary'. As
the 'uk' scraper does not include any second subexpressions, do not
update the test data for now.
Jim Hague [Tue, 12 Dec 2017 21:08:29 +0000 (21:08 +0000)]
eit: Allow empty match subexpressions (#4787)
If a scrape regex includes a subexpression matching the null string (),
this match is treated as if the regex did not match.
Amend this to return an empty string as the match; this is plainly what
the regex author wanted.
As an example of why this might be wanted, consider the UK Freeview
extraction of a subtitle from the summary. A user might wish to specify
the subtitle is left blank if not obvious subtitle is present in the
summary.
E.Smith [Tue, 5 Dec 2017 16:43:52 +0000 (16:43 +0000)]
dvr: Add autorec for new-only. (#1167).
Previously we had "all", "new/unknown", and "repeat", but
no ability to only record episodes marked as "new". So we
rename DVR_AUTOREC_BTYPE_NEW to DVR_AUTOREC_BTYPE_NEW_OR_UNKNOWN
to remain backward compatibility with existing autorec
rules and add new semantics for DVR_AUTOREC_BTYPE_NEW.
We don't update htsp since it currently does not send the
broadcast type field.
Also alter DVR_AUTOREC_BTYPE_NEW_OR_UNKNOWN since
previously we never checked 'new' but instead checked 'repeat'.
However, SD has a previously-shown for all programmes (even first
showings) which causes us to mark programmes as repeat.
It is difficult to fix the repeat logic without breaking existing
behaviour since in the US a programme can be a premiere but have
a previously-shown of the previous day due to timezone differences
on the coasts. Similarly, programmes can be premiere outside the US
but have a previously shown date from the US or from a different channel.
For that reason we now check 'new' instead of 'repeat'.
Real example: Programme is shown on channel A at 9pm and on A+1 timeshift
channel at 10pm. Both are marked as "new" in the paper/OTA tv guide. However,
the programme was actually first shown three years ago on a premium
channel, so it's actually also a repeat since it has been shown before.
So the programme is both a new episode and a repeat episode.
Similarly, one of my tv channel insists Roger Moore Bond films from the
1970s are "new" even though most people would consider them a repeat,
but since it's the first time that particular channel has aired it
they use the "new" tag.
E.Smith [Tue, 5 Dec 2017 20:11:10 +0000 (20:11 +0000)]
ui: Allow filtering/autorec from EPG by category. (#4777).
If we have categories on the server (from xmltv) then
we create a second toolbar on the EPG and add filters for
filtering by category. These are then included in the
autorec rule created from the EPG.
We use a second toolbar since the primary toolbar is a
too cramped to fit more search drop-down boxes.
E.Smith [Tue, 5 Dec 2017 20:09:30 +0000 (20:09 +0000)]
dvr: Fix autorec if it has a category but event has no category. (#4777).
Although we use a drop-down list for autorec categories, if the
user has no categories enabled (such as OTA) and creates an autorec
with a category then it would match all events.
Now we fix it that events without a category can never match an
autorec with categories.
macrule [Wed, 29 Nov 2017 17:18:53 +0000 (18:18 +0100)]
wrappers: Implemented correctly for Darwin.
pthread_cond_timedwait() is not usable on Darwin, because it cannot be configured to use the monotonic clock. So instead the relative pthread_cond_timedwait_relative_np() is used with a relative time to wait for.
Only tvhthread_renice() is missing, but there seems to be currently no way on Darwin or FreeBSD to implement per-thread prioritization. The #warning is good, but it breaks with the default -Werror compile flag.
macrule [Wed, 29 Nov 2017 17:18:53 +0000 (18:18 +0100)]
tvhpoll: Fixed tvhpoll_add kqueue implementation.
The semantics of tvhpoll_add() in the epoll implementation is to set exactly the specified filters, and not add to any previously added ones. The kqueue implementation only added filters, and never removed those that were not set anymore.
This caused busy-polling in satip_frontend on FreeBSD and Darwin, because tvhpoll_wait() always returned immediately. This happened because the receiving socket was always ready to accept data for writing. The following recv() call was called repeatedly without any delay and caused high CPU utilization.
E.Smith [Sun, 26 Nov 2017 13:39:19 +0000 (13:39 +0000)]
http: Increase maxage for caching for images. (#4594).
Images were previously cached for 10 seconds. Since images
rarely change and we now use icons for categories in the epg
grid, it makes sense to cache them at the client for longer.
E.Smith [Sun, 26 Nov 2017 13:24:44 +0000 (13:24 +0000)]
ui: Use Google Noto Color Emoji for icons for categories/genres. (#4594).
By default, several Linux distributions do not install and use fonts
with the characters we were using for our icons. So we replace them
with pre-rendered png images from Google Noto Color Emoji. We use the
png images (instead of the font) to ensure better compatibility between
different browsers and OSes.
The pre-generated icons are under an Apache 2.0 licence, which is a
different licence to the ttf font (that we don't use) which is a
SIL Open Font licence.
The names of the files are based on the unicode naming convention.
Jasmin Jessich [Sun, 26 Nov 2017 02:42:44 +0000 (03:42 +0100)]
dvbcam: Fix NULL pointer usage
When there is already a CAM assigned to the service, we jump to
update_pid. In commit 7f81d726af1f92b268d031c08cf5d00f0f77a4c6 a
tvhtrace call which prints the CAM name has been added. The name
is accessed by "ac->ca->lca_name", which requires ac set to a
proper value.
This commit adds the ac setting before it jumps to "update_pid".
E.Smith [Thu, 23 Nov 2017 14:54:24 +0000 (14:54 +0000)]
ui: Fallback to genre mapping if category mapping fails. (#4594)
Previously we would map categories or map genres if we had no
categories.
Now we will also map genres if the category mappings fail to generate
any mappings. Current known category mapping always supply 'movie',
'series' or 'sports' so this should not happen.