Hi,
I made a workaround.
Description:
When new service appears, the file in muxes directory changes. This is true for version
HTS Tvheadend 4.1-2415~ge5f5a42-dirty (for example 4.0.7 had directories with service files). I'm using incrontab
https://linux.die.net/man/5/incrontab to detect this change. Example how to setup
incrontab is also in
service_channel_fix.php file. Read man page if you want to know more.
So when this event fired, script
service_channel_fix.php
is called and in parameter
$#
can be stored name of the file that changed. The file name is also
MUX ID where new service was added. The rest is up to
service_channel_fix.php
script. It parses channels stored for old services, stores the channel(s) to new service and also deletes the old not working services.
Change that file with your parameters. Alter
USER
and
PASS
values,
SERVER_PORT@*, etc.
I could not find out how to force incrontab log output of file so I'm storing buffer to variable and at the end storing it to *@LOG_FILE
declared on line
20. Change also if you want.
If you don't want to delete old services, just delete or comment out these two lines:
if (count($oldServiceIds))
deleteServices($oldServiceIds);
Scrpt uses
php-cgi
to run the script. Change it for your environment. Also
chmod
the file with
+x
Use it at your own risk.
Hope it helps :)