bouquet: Allow merging of services across network bouquet, fixes #5617
In a mixed network environment (such as DVB-T and DVB-S) it is common
to receive many of the same channels. However, with "auto map to
channels" on a bouquet, you could not merge the channels across the
network bouquets.
Now we create a separate "Tvheadend Network" in the bouquets and allow
"auto map to channels" on it. Any other bouquets that are enabled but
do _not_ have "auto map to channels" enabled will be added to the
enabled "Tvheadend Network".
So, if "DVB-T Network" and "DVB-S Network" in the bouquet tab are both
enabled _and_ their tickbox for "auto map to channels" is deselected,
then their services will be added to the "Tvheadend Network". That can
then be enabled with "merge channels" to produce the merged channels.
We call it "Tvheadend Network" instead of "Tvheaded Virtual Bouquet"
to be consistent with the other auto-generated names.
The new bouquet is lazily updated to ensure the CPU overhead is
minimized. This means that when other bouquets are scanned, we wait
until the system is quiet before updating the new bouquet with
the new channels.
This commit adds support for containizersation of TVHeadend. It adds the
actual technology agnostic container file, an entry point and
healthcheck for it and a github workflow component to publish it.
TODO: Healthcheck script is not yet working.
TODO: Add decent documetnation
Michael Marley [Tue, 6 Feb 2024 21:46:23 +0000 (16:46 -0500)]
Add "recordings" to the backup exclude list
Since https://github.com/tvheadend/tvheadend/pull/1540, enabled by
https://github.com/tvheadend/tvheadend/pull/1535 and
https://github.com/tvheadend/tvheadend/pull/1538, we have been
storing the recordings in a subdirectory of the configuration
directory by default. Because of this, the recordings are getting
stored in the configuration backup. This causes the backups to
take forever and fill the disk (see
https://github.com/tvheadend/tvheadend/issues/1625). Instead,
exclude the "recordings" directory from the backup to prevent this.
dave-p [Tue, 6 Feb 2024 17:22:58 +0000 (17:22 +0000)]
Correct description of Change Parameters flag
The Change Parameters flag on the Access Entries screen for a user determines whether that user's settings will override any previously-set parameters (for example from a wildcard user) - it does not affect the ability of subsequent users to override settings in turn. The exception is the 'Rights' settings where all matched users with the Change flag set are ORed together.
We have both a satip client and server. However the nosatip flag, is for
the client. Make this more clear by renaming it to the internal variable
nosatipcli. Since we do not want to break the user facing API, we keep
the commandline argument nosatip, but add an alias for the future.
We can do better in the future with the rest of the satip reference, but
lets keep this to a minimum for now.
Michael Marley [Fri, 2 Feb 2024 16:42:16 +0000 (11:42 -0500)]
Clean up Debian postinst and postrm scripts
- Fix indentation
- Remove unnecessary {} around variables
- Double-quote all variables when assigned or used as arguments
- Simplify quotes and escaping in creation of the superuser file
- Remove needless variable assignments
- Use $() for command substitution instead of ``
Michael Marley [Fri, 2 Feb 2024 16:38:07 +0000 (11:38 -0500)]
Fix handling of legacy configuration directories in debian/postinst
Detect if the HTS user's home directory starts with "/home/", which
indicates the legacy configuration directory is in use, and use the
correct paths for the "recordings" directory and "superuser" file.
This prevents a useless files/directories from being created and
ensures that "dpkg-reconfigure tvheadend" still updates the
superuser credentials correctly.
Olliver Schinagl [Sun, 13 Aug 2023 08:45:56 +0000 (10:45 +0200)]
main: Warn about unexpected configuration location
When using the `--fork` flag, and no user or config arguments are
supplied, the configuration folder will end up with whatever the default
`daemon` user has set, which is often `/sbin` set as the homedir.
This is weird, but not 'wrong' per say. Lets warn the user that forking
can have an unexpected side effect.
Michael Marley [Wed, 31 Jan 2024 02:51:53 +0000 (21:51 -0500)]
Use sigaction() instead of signal()
The behavior of signal() is not consistent or defined when using it
to set signal handlers (see "Portability" in
https://man7.org/linux/man-pages/man2/signal.2.html). Previously
we got away with this, but starting with GCC 14, using signal()
apparently causes certain syscalls to be restarted after the signal
is caught. One of these is the read() currently on line 63 of
fsmonitor.c. The result is that read() doesn't return when the
fsmonitor thread receives a signal, resulting in the thread never
shutting down, resulting in TVHeadend hanging on any attempt to
terminate it.
Instead, use sigaction(), which has defined behavior when setting
signal handlers. Since invoking sigaction() requires several
lines, a helper was added to tvh_thread.c to avoid code
duplication.
Norm Raden [Thu, 14 Sep 2023 14:52:40 +0000 (10:52 -0400)]
Removed nested function 'appendPidRange' from within function 'tvhdhomerun_frontend_update_pids'
and converted it to a normal function 'tvhdhomerun_frontend_update_pids_appendPidRange'.
Nested functions are a non-standard extension to C that may only be supported by the gcc compiler.
Michael Marley [Sun, 24 Sep 2023 19:35:33 +0000 (15:35 -0400)]
Fix non-admin users not receiving any updates in web UI
All the way back in 54e63e3f9af8fdc0d23f61f3cda7fa7b246c1732, there
was a fix to stop non-admin users from receiving log messages with
potentially-sensitive data. However, this stopped non-admin webui
users from receiving almost any updates over the websocket
interface, which causes a bug where such users don't see newly-
created DVR entries, etc. until refreshing the page. This patch
allows for more granular control over what non-admin users
receive. Specifically, messages originating from subscriptions.c,
mpegts_input.c, and api_service.c, along with all log messages, are
still only sent to admins because they may contain sensitive data
and/or they are only relevant to administrative parts of the UI.
Other messages, such as idnode, DVR, and EPG-related messages, are
once again sent to all webui users to keep the UI up-to-date.
Ben K [Thu, 24 Aug 2023 08:54:38 +0000 (10:54 +0200)]
Fix htsstr_argsplit (treat quotes inside an argument correctly)
There seemed to be a flaw in the splitting logic when it comes to quotes, e.g.:
--output="filename" should be one argument, but htsstr_argsplit treated it as
['--output=', '"filename"] which I think is wrong.
I fixed this and added two tests for this scenario.
Bernd Kuhls [Sat, 5 Aug 2023 10:21:05 +0000 (12:21 +0200)]
support/mkbundle: switch from distutils to setuptools
Fixes build error with python-3.12:
Traceback (most recent call last):
File "support/mkbundle", line 48, in <module>
import distutils.spawn
ModuleNotFoundError: No module named 'distutils'
webui/dvr: Add age_rating in recording details dialogs
The details dialogs in the various recording tabs do not open anymore
with the error `Uncaught TypeError: params[25] is undefined` in the JS
console as the age_rating wasn't requested for those, only for the
overview columns.
While we are at it lets also display the value in the same way the
similar looking (but completely different implemented…) EPG dialog does.
While implementing the alternative/similar broadcast buttons it seems
like previous attempts remained in the final code but were either
unused (like `dvrAlternativeShowings` as the buttons are calling
`epgAlternativeShowingsDialog` instead) or duplicate functions which
already existed like `load`, `previousEvent` & `nextEvent`.
It looks like the compile check doesn't work properly on some
architectures, which appears to eat or ignore the -Werror flag.
Instead, be more specific in that we state that printf formatting errors
are to be triggered on, and treated as an error explicitly, which in the
end is exactly what we are after.