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.
Jasmin Jessich [Thu, 23 Nov 2017 21:53:34 +0000 (22:53 +0100)]
dvbcam: Fixed saving of a cleared dvbcam caid_list (from WEB UI)
caclient_dvbcam_class_caid_list_set didn't count the existing entries in the
dvbcam caid_list. Thus, it couldn't check if the old and the new list size
differ. This was only a problem when the list was cleared, because the
change flag was not set in this case and the empty list was not saved.
E.Smith [Wed, 22 Nov 2017 10:54:03 +0000 (10:54 +0000)]
ui: Don't display subtitle if it is same as summary. (#4594).
Some OTA don't have a separate sub-title and description/summary
so if they are the same then don't display it as a sub-title since
the description is often long.
E.Smith [Sat, 18 Nov 2017 17:14:52 +0000 (17:14 +0000)]
ui: Add category/genre/new icons and more details (#4594).
We now display a separate column indicating if a programme is
new. This column also contains icons indicating the programme type
based on the category (from xmltv) or genre (from OTA).
This uses characters rather than icons since most modern fonts
supply glyphs that we can use. We avoid using too-modern glyphs
(such as Unicode-9.0, 2016) and try to use older ones that are
likely to be in Windows 7 or later. Unfortunately there is no
easy way to determine if a particular system contains a glyph,
but most systems revert to another font if necessary.
Also added a number of new details to the dialogs for EPG and DVR
to display previously shown time and cast/credit/keyword details
for DVR upcoming.
Additionally we display "Film (yyyy)" instead of "Film" if we
have the details to help the user differentiate remakes.
E.Smith [Wed, 22 Nov 2017 13:32:31 +0000 (13:32 +0000)]
api: Use same name copyright_year for EPG and DVR. (#4594).
Previously the UI EPG used copyrightYear to be consistent with
the htsp naming convention, however since DVR uses the field
name of copyright_year, it makes sense to rename the UI EPG
component name.
E.Smith [Wed, 22 Nov 2017 13:33:23 +0000 (13:33 +0000)]
eit: Four digit regex is copyright_year not air date. (#4594).
Previously we parsed is as a first_airdate since the copyright_date
field didn't exist. However, now the copyright_date field exists in
the EPG it makes more sense to populate this with the four-digit
year.
E.Smith [Sun, 19 Nov 2017 13:32:39 +0000 (13:32 +0000)]
xmltv: Handle substring timestamps. (#4594)
The DTD spec says that timestamps can be substrings. These
are typically used when specifying a previously-shown date
where it only has they YYYYMMDD and not the HHMMSS.
So we now parse these correctly which ensures we correctly
set the previously shown timestamp.
Jasmin Jessich [Sat, 18 Nov 2017 01:38:51 +0000 (02:38 +0100)]
Added ECM PIDs subscribing
- dvbcam_service_start can be now executed repeatedly. This happens due to
PMT changes (e.g.: CA descriptor change).
- Limit check in dvbcam removed, because this needs to be done per CAM.
- Currently 16 ECM PIDs can be stored.
- CAID change handler is still missing.
Jasmin Jessich [Sun, 19 Nov 2017 23:20:10 +0000 (00:20 +0100)]
Remove mpegts_input_open_service_pid
- When dvbcam_service_start is executed the first time c->pid is 0.
dvbcam_service_start is not executed a second time, so it makes
no sense to subscribe the PAT for the CAM.
E.Smith [Thu, 16 Nov 2017 11:20:52 +0000 (11:20 +0000)]
api: Add api convenience call for renaming channels. (#4715).
Add a convenience function for users to rename all channels
that match a particular name. Previously the caller needed
to parse an api/channel/list, extract each channel that
matched the name and then issue an idnode/save for the nodes.
This change allows people to easily fixup their names such as
updating channels that are broadcast with a lowercase name
(and so sort to the end of the list in many UIs); or prefixing
the channels with identifiers. Since the server does the channel
name lookup, it allows non-programmers to issue simple renames
from a script.