]> git.ipfire.org Git - thirdparty/tvheadend.git/log
thirdparty/tvheadend.git
6 years agowebui: more tooltips for help buttons!
mpmc [Wed, 24 Oct 2018 13:04:49 +0000 (14:04 +0100)] 
webui: more tooltips for help buttons!

6 years agotcp: fix wrong used variable initialization, issue #5290
Jaroslav Kysela [Wed, 24 Oct 2018 17:57:29 +0000 (19:57 +0200)] 
tcp: fix wrong used variable initialization, issue #5290

6 years agoaccess: fix access_copy() for aa_auth, fixes #5285
Jaroslav Kysela [Tue, 23 Oct 2018 08:51:49 +0000 (10:51 +0200)] 
access: fix access_copy() for aa_auth, fixes #5285

6 years agoservice mapper: fix locking, issue #5261
Jaroslav Kysela [Tue, 23 Oct 2018 06:27:45 +0000 (08:27 +0200)] 
service mapper: fix locking, issue #5261

6 years agoservice mapper: try to determine quickly services without A/V streams, issue #5261
Jaroslav Kysela [Mon, 22 Oct 2018 16:50:53 +0000 (18:50 +0200)] 
service mapper: try to determine quickly services without A/V streams, issue #5261

6 years agowebui: fix http_m3u_playlist_add(), fixes #5274
Jaroslav Kysela [Mon, 22 Oct 2018 16:37:35 +0000 (18:37 +0200)] 
webui: fix http_m3u_playlist_add(), fixes #5274

6 years agoservice mapper: fix mono2sec -> sec2mono thinko
Jaroslav Kysela [Mon, 22 Oct 2018 10:36:22 +0000 (12:36 +0200)] 
service mapper: fix mono2sec -> sec2mono thinko

6 years agodvr: fix the dvr_rec_subscribe cleanup
Jaroslav Kysela [Mon, 22 Oct 2018 07:06:12 +0000 (09:06 +0200)] 
dvr: fix the dvr_rec_subscribe cleanup

6 years agoaccess: do not use + character for the auth code (HTTP deescaping), issue #5274
Jaroslav Kysela [Mon, 22 Oct 2018 07:01:15 +0000 (09:01 +0200)] 
access: do not use + character for the auth code (HTTP deescaping), issue #5274

6 years agodvr: cleanup the error path in dvr_rec_subscribe()
Jaroslav Kysela [Mon, 22 Oct 2018 06:48:20 +0000 (08:48 +0200)] 
dvr: cleanup the error path in dvr_rec_subscribe()

6 years agodvr_rec: fix early access_destroy
Luis Alves [Sun, 21 Oct 2018 23:20:42 +0000 (00:20 +0100)] 
dvr_rec: fix early access_destroy

6 years agoservice mapper: implement time watchdog (cca 30 seconds)
Jaroslav Kysela [Sun, 21 Oct 2018 18:17:19 +0000 (20:17 +0200)] 
service mapper: implement time watchdog (cca 30 seconds)

6 years agohtsp: Tidy serialization of category and keyword.
E.Smith [Tue, 16 Oct 2018 18:50:39 +0000 (19:50 +0100)] 
htsp: Tidy serialization of category and keyword.

6 years agohttp: auth playlist, return unauthorized when the authcode is not present
Jaroslav Kysela [Sun, 21 Oct 2018 14:34:03 +0000 (16:34 +0200)] 
http: auth playlist, return unauthorized when the authcode is not present

6 years agodoc: add authentication type for playlist in url.md
Jaroslav Kysela [Sun, 21 Oct 2018 08:41:37 +0000 (10:41 +0200)] 
doc: add authentication type for playlist in url.md

6 years agofixes for the pernament tickets, issue #5274
Jaroslav Kysela [Sun, 21 Oct 2018 08:37:23 +0000 (10:37 +0200)] 
fixes for the pernament tickets, issue #5274

6 years agohttp: terminate path correctly in http_resolve()
Jaroslav Kysela [Sun, 21 Oct 2018 08:27:46 +0000 (10:27 +0200)] 
http: terminate path correctly in http_resolve()

6 years agoadd pernament tickets for the authentization, fixes #5274
Jaroslav Kysela [Fri, 19 Oct 2018 20:40:58 +0000 (22:40 +0200)] 
add pernament tickets for the authentization, fixes #5274

6 years agodvb psi: fix for the previous commits - move pmt monitor change to mpegts_service_find()
Jaroslav Kysela [Thu, 18 Oct 2018 18:43:20 +0000 (20:43 +0200)] 
dvb psi: fix for the previous commits - move pmt monitor change to mpegts_service_find()

6 years agodvb psi: fix for the previous commit - reinstall pmt monitor only when it's already...
Jaroslav Kysela [Thu, 18 Oct 2018 18:41:38 +0000 (20:41 +0200)] 
dvb psi: fix for the previous commit - reinstall pmt monitor only when it's already installed

6 years agodvb psi: change PMT monitor when PMT PID changes for SID, issue #4942
Jaroslav Kysela [Thu, 18 Oct 2018 18:36:59 +0000 (20:36 +0200)] 
dvb psi: change PMT monitor when PMT PID changes for SID, issue #4942

6 years agolinuxdvb: fix again the PLS code skip when the default value is used
Jaroslav Kysela [Thu, 18 Oct 2018 06:58:18 +0000 (08:58 +0200)] 
linuxdvb: fix again the PLS code skip when the default value is used

6 years agolinuxdvb: set PLS code only when it differs from 1, fixes #5266
Jaroslav Kysela [Wed, 17 Oct 2018 11:28:54 +0000 (13:28 +0200)] 
linuxdvb: set PLS code only when it differs from 1, fixes #5266

6 years agobintray: disable uploads :-(
Jaroslav Kysela [Wed, 17 Oct 2018 11:24:11 +0000 (13:24 +0200)] 
bintray: disable uploads :-(

6 years agocampt: fix the ct_multipid initialization, fixes #5097
Jaroslav Kysela [Wed, 17 Oct 2018 11:22:30 +0000 (13:22 +0200)] 
campt: fix the ct_multipid initialization, fixes #5097

6 years agoDVR: add username to the subscription, fixes #5215, fixes #5263
Jaroslav Kysela [Tue, 16 Oct 2018 14:59:51 +0000 (16:59 +0200)] 
DVR: add username to the subscription, fixes #5215, fixes #5263

6 years agoFreeBSD: kevent is not a bitmask.
E.Smith [Mon, 15 Oct 2018 19:55:18 +0000 (20:55 +0100)] 
FreeBSD: kevent is not a bitmask.

The kevent does not take a bitmask. So if you register for READ|WRITE
then it only registers READ since READ=-1 and WRITE=-2.

This means that with an async socket connect then you do not get a
callback on connect.

So we need to register these separately.

6 years agoRevert "FreeBSD: Fix recv problem if no data received."
Jaroslav Kysela [Tue, 16 Oct 2018 14:51:00 +0000 (16:51 +0200)] 
Revert "FreeBSD: Fix recv problem if no data received."

This reverts commit 3895c923a3a959da05080831b8146c09ed143b00.

6 years agohtsmg: align the access to list/dictionary
Jaroslav Kysela [Tue, 16 Oct 2018 07:01:25 +0000 (09:01 +0200)] 
htsmg: align the access to list/dictionary

6 years agoDVR: recorder - update the running variables from broadcast at start, issue #5256
Jaroslav Kysela [Mon, 15 Oct 2018 14:45:01 +0000 (16:45 +0200)] 
DVR: recorder - update the running variables from broadcast at start, issue #5256

6 years agocwc: fix the wrong memory access in cwc_send_msg()/des, fixes #4888
Jaroslav Kysela [Sat, 13 Oct 2018 22:03:19 +0000 (00:03 +0200)] 
cwc: fix the wrong memory access in cwc_send_msg()/des, fixes #4888

6 years agodvr: fix null dereference in dvr_entry_file_moved(), fixes #5255
Jaroslav Kysela [Sat, 13 Oct 2018 22:01:59 +0000 (00:01 +0200)] 
dvr: fix null dereference in dvr_entry_file_moved(), fixes #5255

6 years agolinuxdvb: support properly PLS ROOT
Jaroslav Kysela [Sat, 13 Oct 2018 10:36:05 +0000 (12:36 +0200)] 
linuxdvb: support properly PLS ROOT

6 years agotsfix: fix dts calc (fixes issue #5252)
Luis Alves [Fri, 12 Oct 2018 12:14:52 +0000 (13:14 +0100)] 
tsfix: fix dts calc (fixes issue #5252)

6 years agosatip client: pass PLS mode to the server
Jaroslav Kysela [Fri, 12 Oct 2018 13:50:37 +0000 (15:50 +0200)] 
satip client: pass PLS mode to the server

6 years agompegts input: clear correctly mux's last pid cache in mpegts_input_close_pid()
Jaroslav Kysela [Fri, 12 Oct 2018 12:42:21 +0000 (14:42 +0200)] 
mpegts input: clear correctly mux's last pid cache in mpegts_input_close_pid()

6 years agosatip client: add DVB-S2 ISI/PLS code support for minisatip (multistream)
Jaroslav Kysela [Fri, 12 Oct 2018 08:15:41 +0000 (10:15 +0200)] 
satip client: add DVB-S2 ISI/PLS code support for minisatip (multistream)

6 years agopass muxer: another fixed for EIT callback, issue #5062
Jaroslav Kysela [Fri, 12 Oct 2018 06:51:50 +0000 (08:51 +0200)] 
pass muxer: another fixed for EIT callback, issue #5062

6 years agodvb-c2: add support for data slice and plp
Jaroslav Kysela [Thu, 11 Oct 2018 19:05:05 +0000 (21:05 +0200)] 
dvb-c2: add support for data slice and plp

6 years agolinuxdvb frontend: add support for DTV_SCRAMBLING_SEQUENCE_INDEX - dvbapi 5.11
Jaroslav Kysela [Thu, 11 Oct 2018 14:13:42 +0000 (16:13 +0200)] 
linuxdvb frontend: add support for DTV_SCRAMBLING_SEQUENCE_INDEX - dvbapi 5.11

6 years agoglobalheaders: separate overall scan time and no-packet time
Jaroslav Kysela [Thu, 11 Oct 2018 12:18:55 +0000 (14:18 +0200)] 
globalheaders: separate overall scan time and no-packet time

6 years agopass muxer: rewrite also tsid/onid for eit table, fixes #5062
Jaroslav Kysela [Tue, 9 Oct 2018 19:13:16 +0000 (21:13 +0200)] 
pass muxer: rewrite also tsid/onid for eit table, fixes #5062

6 years agodescrambler: fix descrambler_data_key_check()
Jaroslav Kysela [Tue, 9 Oct 2018 16:33:02 +0000 (18:33 +0200)] 
descrambler: fix descrambler_data_key_check()

6 years agoidnode: allow negative list keys
Jaroslav Kysela [Tue, 9 Oct 2018 14:51:10 +0000 (16:51 +0200)] 
idnode: allow negative list keys

6 years agosatip client: do not add internal PIDs from services when full mux is not supported...
Jaroslav Kysela [Tue, 9 Oct 2018 06:12:03 +0000 (08:12 +0200)] 
satip client: do not add internal PIDs from services when full mux is not supported, fixes #5245

6 years agodescrambler: try to improve late-key detection, issue #5036
Jaroslav Kysela [Mon, 8 Oct 2018 13:08:46 +0000 (15:08 +0200)] 
descrambler: try to improve late-key detection, issue #5036

6 years agopcloud: fix publink_download
Jaroslav Kysela [Mon, 8 Oct 2018 12:30:08 +0000 (14:30 +0200)] 
pcloud: fix publink_download

6 years agowebui: epg.js - fix typo
Jaroslav Kysela [Mon, 8 Oct 2018 12:06:56 +0000 (14:06 +0200)] 
webui: epg.js - fix typo

6 years agofanart: Comment out version field in module capabilities.
E.Smith [Sat, 6 Oct 2018 15:18:17 +0000 (16:18 +0100)] 
fanart: Comment out version field in module capabilities.

The version field in the scripts should be the same version as
Tvheadend. However it does not seem worthwhile at the moment to
sed a version number in to the scripts since most people will
install via a package manager.

6 years agofanart: Pass programme title language to grabber so it can use it.
E.Smith [Fri, 5 Oct 2018 01:11:13 +0000 (02:11 +0100)] 
fanart: Pass programme title language to grabber so it can use it.

6 years agofanart: Tidy logging in Python script.
E.Smith [Thu, 4 Oct 2018 17:07:33 +0000 (18:07 +0100)] 
fanart: Tidy logging in Python script.

We want to avoid logging stack traces unless the user explicitly
enables debug, otherwise we get tracebacks whenever user does
not specify an apikey for a module they do not wish to use
(but have not disabled).

6 years agodebian: Recommend python, python-requests for tvheadend.
E.Smith [Thu, 4 Oct 2018 14:40:31 +0000 (15:40 +0100)] 
debian: Recommend python, python-requests for tvheadend.

The fanart is written in Python, so recommend these.

Recommends are "packages that would be found together with this one in
all but unusual installations."

6 years agodoc: Add extra documentation for fanart configuration.
E.Smith [Wed, 3 Oct 2018 15:49:51 +0000 (16:49 +0100)] 
doc: Add extra documentation for fanart configuration.

6 years agofanart: Update tmdb to support tv lookups.
E.Smith [Wed, 3 Oct 2018 23:17:53 +0000 (00:17 +0100)] 
fanart: Update tmdb to support tv lookups.

Previously we only support movie lookups on tmdb since the
module we used did not support tv lookups. Now we no longer
use an external module we can perform tv lookups on tmdb too.

6 years agofanart: Rewrite to remove dependency on external tmdb module.
E.Smith [Wed, 3 Oct 2018 22:39:58 +0000 (23:39 +0100)] 
fanart: Rewrite to remove dependency on external tmdb module.

The information we need can easily be retrieved via a
query so avoid the dependency on an external module and
implement the tmdb api retrieval logic ourselves. This
also means we are no longer constrained to be python2.7 only.

6 years agoui: Add TheTVDB.com attribution strings and logos.
E.Smith [Wed, 3 Oct 2018 20:44:37 +0000 (21:44 +0100)] 
ui: Add TheTVDB.com attribution strings and logos.

The logo is taken from:
http://platypus.thetvdb.com/eng/api
and resized with:
convert -resize 32x

6 years agofanart: Allow grabbers to report mandatory config
E.Smith [Wed, 3 Oct 2018 14:11:49 +0000 (15:11 +0100)] 
fanart: Allow grabbers to report mandatory config

This allows them to specify that they need a user key, etc.

6 years agofanart: Add basic tvdb lookup.
E.Smith [Tue, 2 Oct 2018 18:00:42 +0000 (19:00 +0100)] 
fanart: Add basic tvdb lookup.

The lookup is by title+year (+language) only (episode-specific
fanart is not yet retrieved).

To use with Tvheadend, the extra arguments in the grabber need to
include:
--tvdb-key XX
And an optional two character languages as csv:
--tvdb-languages en,it

The key is from registering at TheTVDB.com.

6 years agodvr: Remove fanart entries from the list until we process one.
E.Smith [Wed, 3 Oct 2018 23:54:45 +0000 (00:54 +0100)] 
dvr: Remove fanart entries from the list until we process one.

We might have entries on our list of pending fanart fetches that
no longer need fetching (user changed config, etc.)  So keep
removing entries from the list until we find ones that need
a fanart fetch.

6 years agofanart: Add option to only lookup fanart for identifiable recordings.
E.Smith [Wed, 3 Oct 2018 09:13:24 +0000 (10:13 +0100)] 
fanart: Add option to only lookup fanart for identifiable recordings.

OTA broadcasts can have data that will fail a fanart lookup or is
too vague so will match incorrect programmes. So add option so by
default we ignore fanart for programmes without a year (for movie)
or season/episode (for episode).

6 years agodoozer: fix the jessie builds (update urllib3/contrib/pyopenssl.py)
Jaroslav Kysela [Mon, 8 Oct 2018 11:56:41 +0000 (13:56 +0200)] 
doozer: fix the jessie builds (update urllib3/contrib/pyopenssl.py)

6 years agowebui: replace ... with ellipsis …
mpmc [Fri, 5 Oct 2018 11:38:09 +0000 (12:38 +0100)] 
webui: replace ... with ellipsis â€¦

6 years agowebui: add tooltip to help button
mpmc [Fri, 5 Oct 2018 11:33:02 +0000 (12:33 +0100)] 
webui: add tooltip to help button

6 years agopcloud: add own ca bundle
Jaroslav Kysela [Sun, 7 Oct 2018 18:52:47 +0000 (20:52 +0200)] 
pcloud: add own ca bundle

6 years agoRevert "satip: pass specinv by default for DVB-C, fixes #5231"
Jaroslav Kysela [Sun, 7 Oct 2018 17:06:01 +0000 (19:06 +0200)] 
Revert "satip: pass specinv by default for DVB-C, fixes #5231"

This reverts commit 37f9f6b08666c7f18eab2befd4d28e96f484aabb.

6 years agowebui: add CSFD (http://csfd.cz) to query list
Jaroslav Kysela [Sat, 6 Oct 2018 17:20:27 +0000 (19:20 +0200)] 
webui: add CSFD (http://csfd.cz) to query list

6 years agochannel: fix description for the user icon
Jaroslav Kysela [Fri, 5 Oct 2018 07:57:44 +0000 (09:57 +0200)] 
channel: fix description for the user icon

6 years agoiptv: fix channel icon handling, fixes #5240
Jaroslav Kysela [Fri, 5 Oct 2018 07:53:50 +0000 (09:53 +0200)] 
iptv: fix channel icon handling, fixes #5240

6 years agoparser teletext: a little more fix for duplicate subtitles, fixes #3996
Jaroslav Kysela [Thu, 4 Oct 2018 15:54:52 +0000 (17:54 +0200)] 
parser teletext: a little more fix for duplicate subtitles, fixes #3996

6 years agoparser teletext: try to avoid duplicate subtitles, fixes #3996
Jaroslav Kysela [Thu, 4 Oct 2018 07:04:28 +0000 (09:04 +0200)] 
parser teletext: try to avoid duplicate subtitles, fixes #3996

6 years agosatip client: fix the satip_frontend_rtsp_flags() function
Jaroslav Kysela [Wed, 3 Oct 2018 16:16:30 +0000 (18:16 +0200)] 
satip client: fix the satip_frontend_rtsp_flags() function

6 years agoMakefile: another fix for the static build
Jaroslav Kysela [Wed, 3 Oct 2018 11:05:02 +0000 (13:05 +0200)] 
Makefile: another fix for the static build

6 years agosatip client: change display name to always show the adapter number, IP address and...
Jaroslav Kysela [Wed, 3 Oct 2018 10:35:04 +0000 (12:35 +0200)] 
satip client: change display name to always show the adapter number, IP address and data protocol, fixes #4938

6 years agodoozer: add cosmic cuttlefish
mpmc [Wed, 3 Oct 2018 09:46:47 +0000 (10:46 +0100)] 
doozer: add cosmic cuttlefish

6 years agodoozer: add missing python-requests and manually update certs for older distros
mpmc [Tue, 2 Oct 2018 17:00:31 +0000 (18:00 +0100)] 
doozer: add missing python-requests and manually update certs for older distros

6 years agoOptimize default configuration of SAT>IP Triax TSS 400
Pablo [Tue, 2 Oct 2018 18:41:36 +0000 (20:41 +0200)] 
Optimize default configuration of SAT>IP Triax TSS 400

https://tvheadend.org/issues/4244

As we discussed a while ago, the configuration should be different.

* The complete mux should not be supported
* Along with it an increase of maximum pids is useful to open more channels.

6 years agoui: Use background-size to scale fanart to fit dvr dialog box.
E.Smith [Tue, 2 Oct 2018 22:28:32 +0000 (23:28 +0100)] 
ui: Use background-size to scale fanart to fit dvr dialog box.

Previously the fanart could be too big for the dialog. Now we
scale to fit the dialog.

We use 'cover' which can make the image slightly exceed the
dialog dimensions, compared to 'contain' which would leave
space at the top/bottom if the fanart is an odd dimension.
The 'cover' seems better with the fanart I've seen so far.

6 years agoAdding scrape for bg
zinonino [Tue, 25 Sep 2018 01:16:31 +0000 (04:16 +0300)] 
Adding scrape for bg

Adding scrape for Episode, Season for Bulgarian lang.

6 years agoxmltv: Add option to save epgdb after xmltv import.
E.Smith [Tue, 2 Oct 2018 13:50:03 +0000 (14:50 +0100)] 
xmltv: Add option to save epgdb after xmltv import.

The "periodic save database" means that for xmltv you can
import your daily listings, crash, restart, and not have xmltv
data since the periodic epgdb timer has not elapsed.

So, add an option so the user can save the database after the
import has completed, assuming changes occurred.

This save is delayed by a couple of minutes in case the user
is importing from several different xmltv guides, in which case
the save occurs after the last import.

6 years agoMakefile: static libs - improve rules
Jaroslav Kysela [Tue, 2 Oct 2018 16:37:43 +0000 (18:37 +0200)] 
Makefile: static libs - improve rules

6 years agoMakefile: move -D_FORTIFY_SOURCE=2 to -O2 section
Jaroslav Kysela [Tue, 2 Oct 2018 16:21:56 +0000 (18:21 +0200)] 
Makefile: move -D_FORTIFY_SOURCE=2 to -O2 section

6 years agoapi/ui: status - show the PID lists for subscriptions and inputs, fixes #4934
Jaroslav Kysela [Tue, 2 Oct 2018 16:18:51 +0000 (18:18 +0200)] 
api/ui: status - show the PID lists for subscriptions and inputs, fixes #4934

Original idea and implementation by Mono Polimorph

6 years agoconfigure: libav - check for libswresample or libavresample, fixes #5235
Jaroslav Kysela [Tue, 2 Oct 2018 13:54:19 +0000 (15:54 +0200)] 
configure: libav - check for libswresample or libavresample, fixes #5235

6 years agobintray.py: remove staticlib from tidy
Jaroslav Kysela [Tue, 2 Oct 2018 13:35:09 +0000 (15:35 +0200)] 
bintray.py: remove staticlib from tidy

6 years agohtspmon: python3 fixes
Jaroslav Kysela [Mon, 1 Oct 2018 15:54:24 +0000 (17:54 +0200)] 
htspmon: python3 fixes

6 years agostring list: Need to strdup return value on remove first.
E.Smith [Tue, 2 Oct 2018 11:36:58 +0000 (12:36 +0100)] 
string list: Need to strdup return value on remove first.

The id is part of the buffer itself (rather than separately
allocated), so need to strdup the id when returning first
element.

6 years agodvr: Pre-fetch fanart for upcoming recordings.
E.Smith [Sun, 30 Sep 2018 20:45:21 +0000 (21:45 +0100)] 
dvr: Pre-fetch fanart for upcoming recordings.

We keep track of uuids for upcoming recordings. Once an hour we
get one entry from the list and pre-fetch artwork for it so it
can be displayed in the UI "upcoming recordings" dialog.

This is only done if the user has explicitly enabled fetch
artwork on the entry's profile.

6 years agopython: Need to send log messages to stdout not stderr.
E.Smith [Mon, 1 Oct 2018 21:53:58 +0000 (22:53 +0100)] 
python: Need to send log messages to stdout not stderr.

If we log to stderr then Tvheadend thinks they are error messages
and logs them as error instead of info.

6 years agoui: Add TMDB attribution strings and logos.
E.Smith [Sat, 29 Sep 2018 11:38:37 +0000 (12:38 +0100)] 
ui: Add TMDB attribution strings and logos.

The logo is taken from:
https://www.themoviedb.org/about/logos-attribution
and resized with:
convert -resize 32x

6 years agodvr: Add tick box for fetching artwork.
E.Smith [Sat, 29 Sep 2018 11:12:21 +0000 (12:12 +0100)] 
dvr: Add tick box for fetching artwork.

In Configuration->Recording->Digital Video Recorder Profiles there
is now a "fetch artwork for new recordings" button, and a place
to enter additional arguments (such as --tmdb-key).

6 years agopython: Support multiple grabber modules for movies and tv artwork.
E.Smith [Thu, 27 Sep 2018 21:04:26 +0000 (22:04 +0100)] 
python: Support multiple grabber modules for movies and tv artwork.

The "--modules-movie=a,b,c" command line option will load each of
these modules in turn and ask them to provide artwork. TV modules are
selected via "--modules-tv" option.

The default (if no --modules-movies is provided) is to search the
Python path for python files that are named "tv_meta_*py" and then
call the module's "get_capabilities" to determine if the grabber
supports tv, movie, or both.

Each grabber module is called in turn until all artwork is
retrieved. So, if the first module only provides a fanart, then the
next module can supply the poster image.

Modules can be passed command line options from tvhmeta by prefixing
them with the shortened module name.

So, for a grabber module such as "tv_grab_tmdb", we pass through
command line arguments from tvhmeta to it. So if the tvhmeta is called
with an option of "--tmdb-key" then we pass through "key" as an option
to the tv_grab_tmdb (stripping the "--tmdb").

This allows third parties to produce grabber modules that
automatically integrate.

Also switched from deprecated OptionParser to argparse.

6 years agoinstall: Add tvhmeta and tv_meta_tmdb.py to install files.
E.Smith [Thu, 27 Sep 2018 12:21:40 +0000 (13:21 +0100)] 
install: Add tvhmeta and tv_meta_tmdb.py to install files.

The tvhmeta program allows lookups of metadata for recordings.
The tv_meta_tmdb.py is the underlying file that does lookups
and is both an executable and a library.

6 years agopython: Update to allow tvhmeta to run in dev or in live.
E.Smith [Thu, 27 Sep 2018 12:21:01 +0000 (13:21 +0100)] 
python: Update to allow tvhmeta to run in dev or in live.

In development tree, the libraries are in ../lib/py. In live,
we currently install the library in the same directory so
need to import it differently.

6 years agopython: Add basic tmdb lookup scripts to retrieve artwork.
E.Smith [Thu, 27 Sep 2018 09:57:38 +0000 (10:57 +0100)] 
python: Add basic tmdb lookup scripts to retrieve artwork.

The scripts attempt a tmdb lookup by using the title+year from
the dvr record associated with a particular uuid.

It then sets artwork and fanart.

The script can either be invoked manually or run automatically
from Tvheadend when a recording occurs (pre-recording rule).
In that case it needs to be passed the arguments:
"/usr/local/bin/tvhmeta --uuid %U --tmdb-key abcdef"
...where the key is from the tmdb website sign up.

The tv_meta_tmdb library is stand-alone and can be used
to test specific lookups to determine why they do not work.

A per-user cache is kept inside the tmdb3 library and this
is stored in /tmp.

The tmdb3 library has to be installed. This can be installed via "pip
install tmdb3" or "synth install www/py-tmdb3" depending on OS.

The scripts support a "--debug" option. I'd expect we are likely to
get several wrong/no results, especially with non-English movies until
we have a larger set of failure reasons to work with.

Once we get the tmdb working, we can try and "modularize" it so
different providers can be installed, and add a grabber for tv
episodes.

6 years agoui: Add fanart background to dvr details dialog.
E.Smith [Wed, 26 Sep 2018 22:35:26 +0000 (23:35 +0100)] 
ui: Add fanart background to dvr details dialog.

We now display fanart (if available) on the background of the dvr
dialog. This fanart image is also displayed every ten seconds where
the existing image is displayed.

We have to put the image inside a fixed width container, otherwise if
you alternate between a long thin image and a wide image then the text
reflows.

6 years agoxmltv: Use format "X" instead of "X/" for season/episode export.
E.Smith [Sat, 29 Sep 2018 13:03:44 +0000 (14:03 +0100)] 
xmltv: Use format "X" instead of "X/" for season/episode export.

Previously we'd output "4/ . 3/. /", but some clients can not handle
the omitted "total" number. So we now output the simpler "4 . 3 ."
instead.

6 years agoFreeBSD: Add libunwind trap support for FreeBSD only.
E.Smith [Mon, 1 Oct 2018 17:05:26 +0000 (18:05 +0100)] 
FreeBSD: Add libunwind trap support for FreeBSD only.

Although the existing backtrace works correctly on Linux, on
FreeBSD it frequently generates a backtrace with completely
wrong function names. (FreeBSD 11.2, current latest version).

For example, making htsp_build_dvrentry crash with SEGV, it
would either not generate a stacktrace or would generate a
backtrace of:
-pthread_sigmask
-pthread_getspecific
-service_remove_unseen
-htsp_get_subscription_status
-htsp_init
-tcp_server_done
-tvhthread_create.

...instead of the correct backtrace of:
-<signal>
-htsp_build_dvrentry
-htsp_method_async
-htsp_read_loop
-htsp_serve...

So on FreeBSD only, we use libunwind to generate the
backtrace and function names. We explicitly make
libunwind and libexecinfo mutually exclusive since
FreeBSD has both.

Line are logged similar to:
  CRASH: htsp_build_dvrentry+5d (ip=11f659d sp=7fffd8bc3930)

Note that it does not have line numbers since the addr2line
does not appear to work on FreeBSD (even with the original
backtrace code).

An example of the problem with the old backtrace code using
the frame from htsp_method_async from within the tvheadend
traphandler after the retrieval of the stack frames:

(gdb) print frames
$38 = {0x806473954, 0x806472eb2, 0x7ffffffff193, 0x11f1638 <htsp_method_async+1640>, 0x11fe400 <htsp_read_loop+880>, 0x11f58e6 <htsp_serve+502>, 0x11b9b11 <tcp_server_start+401>,
  0x11af45e <thread_wrapper+302>, 0x80646dc06, 0x0 <repeats 91 times>}

(gdb) print dladdr(0x11f1638, &dli)    <--- addr of htsp_method_async from frame 4.
$39 = 1  <--- success

(gdb) print dli
$40 = {dli_fname = 0x7fffffffef97 ".../build.freebsd/tvheadend", dli_fbase = 0x1021000, dli_sname = 0x1044f91 "service_remove_unseen",   <--- but wrong name
    dli_saddr = 0x11eff80 <service_remove_unseen>}   <--- and this is nearest symbol address

(gdb) print htsp_method_async+1640
    $41 = (htsmsg_t *(*)(htsp_connection_t *, htsmsg_t *)) 0x11f1638 <htsp_method_async+1640>   <---but gdb knows the original address is htsp_method_async

(gdb) print service_remove_unseen
    $42 = {void (const char *, int)} 0x11eff80 <service_remove_unseen> <--- and gdb knows sevice_remove_unseen is at the dli_saddr.

By contrast, with libunwind, we get:

(gdb) print buf
$50 = "htsp_method_async", '\000' <repeats 110 times> <--- libunwind detected correct function name

(gdb) where 10  <--- even though our signal has been delivered on its own stack
 #0  traphandler_libunwind () at src/trap.c:162
 #1  0x000000000120cf06 in traphandler (sig=11, si=0x7fffdbbdb860, UC=0x7fffdbbdb4f0) at src/trap.c:221
 #2  0x0000000806673954 in ?? ()
 #3  0x0000000000000000 in ?? ()

(gdb) print ip
$51 = 18814904

(gdb) disass 18814904  <--- and gdb knows that ip address is for the same method as libunwind detected
Dump of assembler code for function htsp_method_async:
   0x00000000011f1150 <+0>:     push   %rbp

6 years agotrap: Allow chdir /tmp even if prctl not supported.
E.Smith [Mon, 1 Oct 2018 15:57:36 +0000 (16:57 +0100)] 
trap: Allow chdir /tmp even if prctl not supported.

Even though prctl is Linux specific, other platforms allow core
dumps to occur in the cwd, so it's useful to allow the "cd /tmp"
for those platforms if the existing --dump option is specified.

6 years agoepg: Change && to ||.
E.Smith [Mon, 1 Oct 2018 15:52:51 +0000 (16:52 +0100)] 
epg: Change && to ||.

6 years agobuild: Enable hardening options for Debian build.
E.Smith [Mon, 1 Oct 2018 23:44:16 +0000 (00:44 +0100)] 
build: Enable hardening options for Debian build.

The Debian guidelines recommend enable hardening for processes
that handle untrusted data such as network listeners.

This sets various compiler flags for stack smashing and
makes some segments read-only.
https://wiki.debian.org/Hardening