[mythtv-users] How to dump BE and FE settings?

Bill Meek keemllib at gmail.com
Fri Jan 3 04:33:32 UTC 2020


On 1/2/20 8:53 PM, Jerome Yuzyk wrote:
> Having just recovered my FE/BE, which included an OS upgrade and MythTV
> upgrade, I wonder:
> 
>    Is there any way to dump BE and FE settings to review them?
> 
> Any pointers to a script or how to make one?

Easier to just do it with SQL, but this works:

#!/usr/bin/python2
''' Sample that gets all settings '''

from __future__ import print_function
import json
from MythTV.services_api import send as api

BACKEND = api.Send(host='localhost')

RESPONSE = BACKEND.send(endpoint='Myth/GetSettingList')
print(json.dumps(RESPONSE, indent=4, sort_keys=True, separators=(',', ': ')))

RESPONSE = BACKEND.send(endpoint='Myth/GetHosts')
HOSTS_LIST = RESPONSE['StringList']

for host in HOSTS_LIST:
     RESPONSE = BACKEND.send(endpoint='Myth/GetSettingList', rest='HostName={}'
                             .format(host))
     print(json.dumps(RESPONSE, indent=4, sort_keys=True,
                      separators=(',', ': ')))

-- 
Bill


More information about the mythtv-users mailing list