Forums » Tutorial and setups »
Bulk changes (enable/disable) on services and EPG
Added by Beny - about 8 years ago
@All
after years on kaffeine, today evening I changed my dvb-s soft and now I'm happy user of tvheadend (version: HTS Tvheadend 4.0.9-7~gbf276e0~trusty) a great software without doubt.
Easy installation and tones of tutorials - many thanks to developers and the community.
During the quick installation I enabled all services from hotbird and now I have got more then 2000 of them. Manual disabling is out of scope. Before I delete the config and start from scratch I've googled a bit and find a nice way tutorial to tackle my problem.
Link: https://tvheadend.org/boards/4/topics/9280 Unfortunately this post refers to files and file structure which don't exist on my ubuntu. I found the config folder with in ~/.hts/tvheadend$ and now 've got 3 questions:
1: Has the folder "~/.hts/tvheadend/channel/config/" replaced the "~hts/.hts/tvheadend/dvbtransports/" one?
2: Has the field "disable" been replaced by "enabled" and the new values are true/false instead of 1/0?
3: Has the field "dvb_eit_enable" been replaced by "epgauto"?
Could you please either answer above questions or help me to locate the data I have to modify to disable all services and disable all epg feeds - subsequently I will enable just few of them in web-gui.
Your support is appreciated very much.
Beny / hoping that this has not been already described many times
Replies (4)
RE: Bulk changes (enable/disable) on services and EPG - Added by Mark Clarkstone about 8 years ago
Mass edit of grid entries has been added to 4.1.xxxx (dev) - I'm not sure 4.0.x has it though.
The config has changed a lot since 3.x. I can't check as to the actual contents of a 4.0.x config right now as I use 4.1.xxxx mainly.
But it shouldn't be too hard to use sed and replace certain values in the config files.
RE: Bulk changes (enable/disable) on services and EPG - Added by Beny - about 8 years ago
... thanks for your prompt answer.
But it shouldn't be too hard to use sed and replace certain values in the config files.
this is not an issue for me, at all.
What I need is the the name(s) of file(s) and the fields I have to modify. Maybe someone on version 4.0 can provide the names.
The config has changed a lot since 3.x. I can't check as to the actual contents of a 4.0.x config right now as I use 4.1.xxxx mainly.
is the version 4.1 so different from 4.0?
best regards
Beny
RE: Bulk changes (enable/disable) on services and EPG - Added by Robert Cameron about 8 years ago
After browsing my file hierarchy, it looks like the muxes (and their services) live in .hts/tvheadend/input/[input_type]/networks/[random_networkid_string]/muxes/ . The problem is, while most other files seem to be JSON, the files for each mux look like they're binary dumps of the mux objects.
The channel configs live in .hts/tvheadend/channel/config/ , and those are just plain JSON. Here is one of my channels:
{ "enabled": true, "name": "PBS SoCal", "number": 50, "icon": "file:///media/tv/channels/PBS%20SoCal.png", "epgauto": false, "dvr_pre_time": 0, "dvr_pst_time": 0, "epg_running": 0, "services": [ "1af48663c487bb36ca9c6945d3dd91bb", "870a2c2022f60cab7dcde93dddc26af2", "9715059cfbcfd5b782e95514871a7abf" ], "tags": [ "66277c335712651c9a3ddaa9b1058b78", "dec0faeb1f4c91553f9d49a4a0e69e1f" ], "bouquet": "" }
I am uncertain about "dvb_eit_enable", since my inputs are IPTV.
Also, since these files are JSON, you may find better luck with jq0 than with sed.
RE: Bulk changes (enable/disable) on services and EPG - Added by Beny - about 8 years ago
Robert,
again thank you for taking care of my inquire - I do appreciate it!
Reading your feedback I understood that the TVH file structures are similar (if not the same).
My "muxes" are also not a plain text in 4.0.x
I will change just few channel files from .hts/tvheadend/channel/config/ and see if the system does what I want.
This is a good hint, pointing to the JSON format. I'm tending to create a python script (with a few lines) to do the job, as soon as the test will be successful. [edit:] jq works perfectly and is available out of the box i will give it try.
Maybe someone can put more light to the dvb_eit_enable field successor.
best regards
Beny
Evening's update:
I found the service config files to be modified. The files are stored in: ~/.hts/tvheadend/input/dvb/networks/<network-ID>/muxes/<transponders>/
The script has to go transponder by transponder folder and modify all files the sub-folders.
In each file there are to fields:
"enabled" to be set to false in order to disable the service and
"dvb_ignore_eit" to be set to true in order to ignore epg data.
To disable the channels I used following bash script:
#!/bin/sh for file in ls -1 -r ~/.hts/tvheadend/channel/config/* ; do #[[ ! -e $file ]] && continue echo "$file" cat "$file" | jq '.enabled |= false | .epgauto |= false' | sponge "$file" done
The script has to be started from the hts user (relative path ~ to chanel files)