[mythtv-users] Myth and Python
Her Him
dvrhax at yahoo.com
Fri Nov 19 17:40:17 UTC 2010
Thanks.
Can you tell me where you found out about that? I've done some searching but
haven't really had much luck finding detailed information about the myth python
API. Because one of the things I'd like to do is pop a myth native dialog box
for confirmation (the print statements really only being good for debugging).
Thanks again and I appreciate your help
________________________________
From: Raymond Wagner <raymond at wagnerrp.com>
To: Discussion about MythTV <mythtv-users at mythtv.org>
Sent: Thu, November 18, 2010 10:03:51 PM
Subject: Re: [mythtv-users] Myth and Python
On 11/18/2010 21:51, dvrhax 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/20101119/a70dc004/attachment.htm>
More information about the mythtv-users
mailing list