]> git.ipfire.org Git - thirdparty/tvheadend.git/log
thirdparty/tvheadend.git
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

6 years agobuild: Add hardening options.
E.Smith [Mon, 1 Oct 2018 17:32:26 +0000 (18:32 +0100)] 
build: Add hardening options.

Add some hardening options from:
https://wiki.debian.org/Hardening
These protect against basic buffer overruns.

Although debian/rules can have an "export DEB_BUILD_HARDENING=1",
it's useful to have these available across all builds that support
the compiler options.

6 years agochannel: Return unique list of services
E.Smith [Sun, 30 Sep 2018 17:41:02 +0000 (18:41 +0100)] 
channel: Return unique list of services

Previously if multiple services were mapped to same channel then
we would get duplicate entries in the csv, such as a string of
'DVB-T,DVB-T,DVB-S,DVB-S'.

Now we return a unique list of 'DVB-T,DVB-S'.

6 years agosubscription: try to iterate through all adapters on tuning failed error, fixes ...
Jaroslav Kysela [Mon, 1 Oct 2018 09:14:59 +0000 (11:14 +0200)] 
subscription: try to iterate through all adapters on tuning failed error, fixes #5230

6 years agoservice: add error text to the service instance log
Jaroslav Kysela [Mon, 1 Oct 2018 08:17:33 +0000 (10:17 +0200)] 
service: add error text to the service instance log

6 years agosatip: pass specinv by default for DVB-C, fixes #5231
Jaroslav Kysela [Mon, 1 Oct 2018 08:11:55 +0000 (10:11 +0200)] 
satip: pass specinv by default for DVB-C, fixes #5231

6 years agolinuxdvb satconf: fix typo
Jaroslav Kysela [Fri, 28 Sep 2018 18:37:11 +0000 (20:37 +0200)] 
linuxdvb satconf: fix typo

6 years agomakefile disclean: remove debian/.dephelper directory, fixes #5223
Jaroslav Kysela [Fri, 28 Sep 2018 08:43:14 +0000 (10:43 +0200)] 
makefile disclean: remove debian/.dephelper directory, fixes #5223

6 years agodebian: add python-requests to control file
Jaroslav Kysela [Thu, 27 Sep 2018 16:41:03 +0000 (18:41 +0200)] 
debian: add python-requests to control file

6 years agodoozer: add python-requests package as requirement
Jaroslav Kysela [Thu, 27 Sep 2018 16:39:50 +0000 (18:39 +0200)] 
doozer: add python-requests package as requirement

6 years agotry to move build caching to pcloud
Jaroslav Kysela [Thu, 27 Sep 2018 16:35:51 +0000 (18:35 +0200)] 
try to move build caching to pcloud

6 years agogcc8: Only disable warning options for gcc.
E.Smith [Wed, 26 Sep 2018 21:17:19 +0000 (22:17 +0100)] 
gcc8: Only disable warning options for gcc.

The clang compiler does not have such options.

6 years agodvr: Persist dvr entry filename upon creation.
E.Smith [Sun, 23 Sep 2018 09:13:12 +0000 (10:13 +0100)] 
dvr: Persist dvr entry filename upon creation.

Previously we added the filename to the dvr_entry at the start of the
recording, but did not persist it. This meant that if tvheadend
crashed before the programme completed then we would leave a file on
disk which is not referenced by any recording, hence will never be
deleted.

So we persist after the file is created/stream opened. This entry then
has filename, stream info, and (actual) start time, but no (actual)
stop time.

6 years agoAdd fanartImage to htsp dvrEntry messages.
E.Smith [Wed, 26 Sep 2018 12:13:49 +0000 (13:13 +0100)] 
Add fanartImage to htsp dvrEntry messages.

Currently this fanartImage is set by the user in recording
post-processing. So, a "%U" format specifier gives the user the
uuid of the recording and they can use api/idnode/{load,save}
to add fanart/image artwork from appropriate sources.
This fanart is then displayed in Kodi via pvr.hts.

6 years agopython: Add tvhmeta program for setting artwork on a dvr recording.
E.Smith [Wed, 26 Sep 2018 00:23:28 +0000 (01:23 +0100)] 
python: Add tvhmeta program for setting artwork on a dvr recording.

Very basic program for setting artwork/fanart in a dvr entry,
primarily as a proof of concept. Retrieving of artwork from an
external source is not done.

The program demonstrates retrieving existing data from the server for
the recording, updating the artwork, saving it, then re-fetching to
show the change has been applied.

The uuid can be found via the %U format specifier in the recording
post-processing commands.

Sample usage:
./tvhmeta --artwork-url http://art/img1.jpg --fanart-url http://art/img2.jpg --uuid 8fefddddaa8a57ae4335323222f8e83a1

6 years agodvr: Add new format specifier %U for uuid in postproc.
E.Smith [Tue, 25 Sep 2018 23:25:39 +0000 (00:25 +0100)] 
dvr: Add new format specifier %U for uuid in postproc.

6 years agodvr: Allow artwork to be set via idnode/save.
E.Smith [Tue, 25 Sep 2018 23:19:07 +0000 (00:19 +0100)] 
dvr: Allow artwork to be set via idnode/save.

6 years agodvr: Add fanart_image to dvr_entry.
E.Smith [Tue, 25 Sep 2018 18:44:53 +0000 (19:44 +0100)] 
dvr: Add fanart_image to dvr_entry.

6 years agoFix building with gcc 8
MastaG [Wed, 26 Sep 2018 08:25:00 +0000 (10:25 +0200)] 
Fix building with gcc 8
- Patch for nasm taken from Fedora 28
- Added CFLAGS -Wno-stringop-truncation -Wno-stringop-overflow
- fdk-aac requires -fPIC to link properly

6 years agopython: Update to be compatible with python 3.
E.Smith [Tue, 25 Sep 2018 17:07:56 +0000 (18:07 +0100)] 
python: Update to be compatible with python 3.

6 years agopython: Bump to latest HTSP_PROTO_VERSION.
E.Smith [Tue, 25 Sep 2018 12:14:14 +0000 (13:14 +0100)] 
python: Bump to latest HTSP_PROTO_VERSION.

6 years agopython: Port to Python3.
E.Smith [Tue, 25 Sep 2018 11:53:46 +0000 (12:53 +0100)] 
python: Port to Python3.

Python 3 requires "Exception as e" instead of "Exception, e". This new
syntax is compatible with Python2.6+ and was introduced in PEP-3110
(Jan 2006).

6 years agopython: Handle incorrect utf-8 decodes.
E.Smith [Tue, 25 Sep 2018 11:50:57 +0000 (12:50 +0100)] 
python: Handle incorrect utf-8 decodes.

Some broadcasts can have different charsets (such as iso-8859-1) but
we assume utf-8 unless user has set it correctly. So when decode fails
we get an exception.  So we now attempt to decode with error
replacement so user sees incorrect character.

This gives "u'Denise Th\ufffd\ufffd':" as the string returned instead
when the received name contains an é that is in iso-8859-1 instead of
utf-8.

6 years agopython: Make files python2/python3 compatible.
E.Smith [Tue, 25 Sep 2018 00:08:34 +0000 (01:08 +0100)] 
python: Make files python2/python3 compatible.

Ensure files are compatible with python2 and python3.
Main differences:
- print requires brackets
- string is bytes in python2 and unicode in python3
- need to use struct to pack/unpack binary data
- need to convert socket data to bytearray to allow data extraction

6 years agopython: Need to utf-8 decode our strings.
E.Smith [Sun, 23 Sep 2018 13:59:39 +0000 (14:59 +0100)] 
python: Need to utf-8 decode our strings.

6 years agoui: Add Next/Prev buttons to filter epg channels.
E.Smith [Sat, 22 Sep 2018 17:19:15 +0000 (18:19 +0100)] 
ui: Add Next/Prev buttons to filter epg channels.

This provides a simple way to provide a "now & next" view in the
EPG.

6 years agoxmltv: Output genres to exported xmltv. (#4266)
E.Smith [Sat, 22 Sep 2018 12:04:14 +0000 (13:04 +0100)] 
xmltv: Output genres to exported xmltv. (#4266)

Based on patch by Iván M. A. posted in issue #4266.

Issue: #4266

6 years agoxmltv: Add episode number information to exported xmltv guide. (#4266)
E.Smith [Sat, 22 Sep 2018 11:51:35 +0000 (12:51 +0100)] 
xmltv: Add episode number information to exported xmltv guide. (#4266)

This assumes that the imported tv guide has correct populated
the fields, rather than using an arbitrary scheme.

Issue: #4266

6 years agodvr: Change time(NULL) to gclk for consistency.
E.Smith [Fri, 21 Sep 2018 23:29:05 +0000 (00:29 +0100)] 
dvr: Change time(NULL) to gclk for consistency.

6 years agodvr: Fake create timestamp for old dvr entries.
E.Smith [Fri, 21 Sep 2018 17:23:31 +0000 (18:23 +0100)] 
dvr: Fake create timestamp for old dvr entries.

Old dvr_entry records (tvh4.2) do not have a create timestamp, so we
fake one based on the start time of the recording. This will allow
us to send the timestamp to the UI in the future knowing that it
will give consistent results for user sorting since it may be
useful for user to sort upcoming recordings by when they were
created (i.e., scheduled).

6 years agodvr: Add create time to dvr_entry and use it.
E.Smith [Fri, 21 Sep 2018 17:19:28 +0000 (18:19 +0100)] 
dvr: Add create time to dvr_entry and use it.

We have to ensure we don't async reschedule if we have only just been
created then destroyed, otherwise we can enter a loop where every few
minutes the autorec is checked, realizes it can schedule against a
current broadcast, create the dvr_entry, then find it's a duplicate
of an existing recording/dvr_entry, so destroy the new entry, which
then causes the loop to start again later.

So, if a dvr_entry is created and destroy quickly then we avoid
the async reschedule. This breaks the loop since we no longer
trigger a second async reschedule.

6 years agodvr: Fix logging of duplicates (needs different buffer for second uuid).
E.Smith [Fri, 21 Sep 2018 23:13:10 +0000 (00:13 +0100)] 
dvr: Fix logging of duplicates (needs different buffer for second uuid).

6 years agodvr: Mark dvr entries as duplicates early to avoid logging.
E.Smith [Fri, 21 Sep 2018 10:01:09 +0000 (11:01 +0100)] 
dvr: Mark dvr entries as duplicates early to avoid logging.

When autorecs are modified, we can do an async reschedule to ensure
recordings are correctly updated in case the autorecs interact.
However this can cause excessve logging in some circumstances.

Effectively, if there is a recording on disk and the autorec matches
the same recording in the future then the dvr_entry_create_by_autorec
can exit the "bcast" loop with no match at all (since entry on disk
frequently, but not always, has a null de_bcast).

This then means we create the dvr_entry, and, if the programme is
broadcasting now, then we immediately schedule a timer to start the
recording and log an info to say scheduled. We then immediately cancel
the recording, delete the dvr_entry, which then causes us do an async
schedule. But this async schedule realizes the autorec matches the
broadcast, so we go through the process again.

So, first stage is to delete the duplicate before we do any logging.
Unfortunately, due to the way dup matching works (only dvr entry vs
dvr entry, not vs bcast), we have to create a dvr_entry to do the
matching.

We also need to check duplicate event after it is inserted in to
de_global_link (to avoid assertion fault).

6 years agodvr: Ensure non-scheduled dvr_entry is always "best".
E.Smith [Thu, 20 Sep 2018 22:08:06 +0000 (23:08 +0100)] 
dvr:  Ensure non-scheduled dvr_entry is always "best".

Previously in dvr_is_better_recording_timeslot we would sanity check
that the old channel and broadcast exists before further checks.

However, it probably makes sense to ensure that a non-scheduled
dvr_entry (such as already recorded) is always the better match even
though it might not be linked to any broadcasts.

6 years agowebui: Deleted name text from previous / next buttons, hide "Record program" button...
pablozg [Sat, 22 Sep 2018 18:37:39 +0000 (20:37 +0200)] 
webui: Deleted name text from previous / next buttons, hide "Record program" button when the event is scheduled or recording

6 years agowebui: Add Previous button to epg and dvr, fix minor issues (If you select the first...
pablozg [Fri, 21 Sep 2018 19:34:28 +0000 (21:34 +0200)] 
webui: Add Previous button to epg and dvr, fix minor issues (If you select the first/last row the previous/next are active when the popup window is opened first time)

6 years agodvr: Add minseason and maxseason to autorec (#5176)
E.Smith [Thu, 20 Sep 2018 19:00:37 +0000 (20:00 +0100)] 
dvr: Add minseason and maxseason to autorec (#5176)

This allows users to specify specific seasons to record,
it has to be >= min and <= max.

For example min=5,max=5 will record only season 5.

Setting min=5,max=0 will record everything on season 5 or
later, which is useful if you've already seen seasons 1--4.

This can then be combined with the normal fulltext regex
such as "Simpsons"+minseason=12.

Fixes: #5176
6 years agoeit config: fix Bulsatcom 39E, issue #5219
Jaroslav Kysela [Tue, 25 Sep 2018 06:16:50 +0000 (08:16 +0200)] 
eit config: fix Bulsatcom 39E, issue #5219

6 years agobintray.py: handle 409 error as warning for upload (fix jessie builds)
Jaroslav Kysela [Thu, 20 Sep 2018 15:20:20 +0000 (17:20 +0200)] 
bintray.py: handle 409 error as warning for upload (fix jessie builds)

6 years agoepg.js: fix indent
Jaroslav Kysela [Thu, 20 Sep 2018 15:02:12 +0000 (17:02 +0200)] 
epg.js: fix indent

6 years agohttp: add http_username() and use it in webui, fixes #5214, fixes #5215
Jaroslav Kysela [Thu, 20 Sep 2018 14:49:05 +0000 (16:49 +0200)] 
http: add http_username() and use it in webui, fixes #5214, fixes #5215

6 years agoparser hevc: fix return value from hevc_decode_sps(), fixes #5204
Jaroslav Kysela [Thu, 20 Sep 2018 13:51:47 +0000 (15:51 +0200)] 
parser hevc: fix return value from hevc_decode_sps(), fixes #5204

6 years agoui: Add channel name to dvr dialog.
E.Smith [Thu, 20 Sep 2018 13:10:35 +0000 (14:10 +0100)] 
ui: Add channel name to dvr dialog.

6 years agoui: Include channel name on epg broadcast details dialog.
E.Smith [Thu, 20 Sep 2018 09:33:33 +0000 (10:33 +0100)] 
ui: Include channel name on epg broadcast details dialog.

6 years agoui: Make epg dialog slightly wider.
E.Smith [Thu, 20 Sep 2018 01:17:25 +0000 (02:17 +0100)] 
ui: Make epg dialog slightly wider.

This is to accomodate the "next" button which was slightly truncated.

6 years agoui: Add 'next' button to DVR broadcast details.
E.Smith [Thu, 20 Sep 2018 00:57:34 +0000 (01:57 +0100)] 
ui: Add 'next' button to DVR broadcast details.

6 years agoui: Add 'next' button to EPG broadcast details.
E.Smith [Thu, 20 Sep 2018 00:05:44 +0000 (01:05 +0100)] 
ui: Add 'next' button to EPG broadcast details.

6 years agotranscode: fix hwaccels_decode_setup_context() for ffmpeg 4.0.2, fixes #5202
Jaroslav Kysela [Thu, 20 Sep 2018 13:39:37 +0000 (15:39 +0200)] 
transcode: fix hwaccels_decode_setup_context() for ffmpeg 4.0.2, fixes #5202

6 years agomain: set default user/group only when specified for non-root users, fixes #5213
Jaroslav Kysela [Thu, 20 Sep 2018 12:46:42 +0000 (14:46 +0200)] 
main: set default user/group only when specified for non-root users, fixes #5213

6 years agoFreeBSD: Check for fdatasync system call since it is supported on FreeBSD 11.1 and...
E.Smith [Mon, 17 Sep 2018 12:10:27 +0000 (13:10 +0100)] 
FreeBSD: Check for fdatasync system call since it is supported on FreeBSD 11.1 and later.

6 years agoFreeBSD: Requires libinotify for inotify support.
E.Smith [Wed, 19 Sep 2018 16:16:22 +0000 (17:16 +0100)] 
FreeBSD: Requires libinotify for inotify support.

6 years agoFreeBSD: Support different stat format in Makefile.webui.
E.Smith [Wed, 19 Sep 2018 15:57:24 +0000 (16:57 +0100)] 
FreeBSD: Support different stat format in Makefile.webui.

The stat program on FreeBSD requires different arguments to GNU
stat. In the past, this is done by the ports patching the Makefile
post-extract.

Instead, we'll configure the program's arguments based on platform.
We'll also use %z (filesize) instead of the port's %b (file blocks) so
we generate equivalent output to the Linux version..

6 years agoui: Add grouping format specifier for dates.
E.Smith [Wed, 19 Sep 2018 18:43:05 +0000 (19:43 +0100)] 
ui: Add grouping format specifier for dates.

When grouping recordings by datetime, each group tends to only
have one recording since time field is unique.

So, when grouping, we only use the date-portion and not the time
portion in order to create the group.

6 years agodvr: Async reschedule autorecs whenever a log entry is destroyed.
E.Smith [Wed, 19 Sep 2018 13:14:37 +0000 (14:14 +0100)] 
dvr: Async reschedule autorecs whenever a log entry is destroyed.

Destroying a log entry can cause another autorec rule to be valid and
need scheduling.

For example, if you have two autorec rules that match the same
programme then only one autorec rule will schedule the programme
and the other autorec will see the programme is scheduled and do
nothing.

However, if you then disable the first autorec rule, then we need the
second autorec rule to re-arm the timer for that programme since it
still matches it.

This resheduling is done async after a delay. This avoids large
changes causing constant rescheduling. So, if user deletes a thousand
log files, we do not want a thousand reschedules to occur. Instead,
we dispatch a single timer after the last update has occurred.

6 years agodvr: Add minyear/maxyear to autorec.
E.Smith [Tue, 18 Sep 2018 22:34:04 +0000 (23:34 +0100)] 
dvr: Add minyear/maxyear to autorec.

My listings provider thinks every old film is worth 5/5, so we add
minyear to allow an autorec of "good films" to filter out old
films. Also add corresponding maxyear for people who think the
opposite and only want old programmes recorded.

6 years agoui: Fix createToolbar2 issues on some recent browsers.
E.Smith [Tue, 18 Sep 2018 17:25:15 +0000 (18:25 +0100)] 
ui: Fix createToolbar2 issues on some recent browsers.

Recent versions of Firefox had an exception saying the createToolbar2
function does not exist when it was called to create the secondary
toolbar that is used for category searching in the EPG.

I believe this was due to scoping issues, so rescoped the variables.
This worked, but although the toolbar was added it was not displayed
on Firefox.  So changed the way the toolbar is added and it now works
on Firefox and Safari.

6 years agoFix a few "old-style-declaration" warnings in gcc.
E.Smith [Mon, 17 Sep 2018 16:17:24 +0000 (17:17 +0100)] 
Fix a few "old-style-declaration" warnings in gcc.

Mainly needing to put "static" first and "__thread" earlier.

6 years agoRemove clang no-incompatible-pointer-types flag.
E.Smith [Mon, 17 Sep 2018 15:26:11 +0000 (16:26 +0100)] 
Remove clang no-incompatible-pointer-types flag.

The official build runs with gcc which checks for some incompatible
pointers for assignment of const to non-const, whereas clang
build disabled such warnings.

So, update to re-enable the check on clang and fixup couple of
locations that failed.

6 years agoUpgrade to libhdhomerun_20180817
Alex Mekkering [Mon, 17 Sep 2018 12:26:02 +0000 (14:26 +0200)] 
Upgrade to libhdhomerun_20180817

6 years agodvr: Avoid recording partial programme if autorec created mid-programme.
E.Smith [Wed, 19 Sep 2018 14:22:31 +0000 (15:22 +0100)] 
dvr: Avoid recording partial programme if autorec created mid-programme.

When creating an autorec, it can match a programme that has already
started. If so, it's better to prefer the later recording so you get a
full recording.

So, if it's 09:10 and there is an hour long programme that started at
09:00 but is repeated at 10:00, then let's record at 10:00 instead and
get the full hour, instead of at 09:10 and only get 50 minutes.

6 years agodvr: Only do time slot scheduling in the scheduled state.
E.Smith [Mon, 17 Sep 2018 19:41:52 +0000 (20:41 +0100)] 
dvr: Only do time slot scheduling in the scheduled state.

We do not want a currently recording programme to be cancelled
due to a better channel being found. For example recording a SD
channel and then the OTA updates and finds an HD version of the
show at the same time and so tries to schedule that HD version
instead.

6 years agodvr: Make timeslot scheduling configurable.
E.Smith [Mon, 17 Sep 2018 19:10:01 +0000 (20:10 +0100)] 
dvr: Make timeslot scheduling configurable.

The configuration to enable finding a 'best' time slot for
recording is now configurable as an advanced option in
Configuration->Recording->DVR Profiles, with the default being
disabled.

When toggled, the autorec rules themselves need to be manually
toggled to cause them to reschedule.