[mythtv-users] Myth and Python
Raymond Wagner
raymond at wagnerrp.com
Fri Nov 19 03:03:51 UTC 2010
On 11/18/2010 21:51, Her Him wrote:
> However while it does work to toggle between 5.1 and stereo it doesn't
> take effect until after I go back through 'General' setup and click
> all the way through finish. So for some reason even though the audio
> is set properly it doesn't honor that its changed until going back
> through the menu.
Altered version...
> #!/usr/bin/python
>
> from MythTV import MythBE
>
> be = MythBE()
> db = be.db
> hostname = db.gethostname()
>
> print 'Host: %s Max Channels:
> %s'%(hostname,mythtv.db.settings[hostname]['MaxChannels'])
>
> if db.settings[hostname]['MaxChannels']==u'2':
> db.settings[hostname]['MaxChannels']=u'6'
> elif db.settings[hostname]['MaxChannels']==u'6':
> db.settings[hostname]['MaxChannels']=u'2'
>
> print 'Host: %s Max Channels:
> %s'%(hostname,mythtv.db.settings[hostname]['MaxChannels'])
>
> be.backendCommand('MESSAGE[]:[]CLEAR_SETTINGS_CACHE')
That last command issues a CLEAR event, which then gets pushed through
to all connected frontends and backends, informing the frontend to pull
new settings from the database as needed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20101118/46237a0c/attachment.htm>
More information about the mythtv-users
mailing list