<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Thanks.<br><br>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).<br><br>Thanks again and I appreciate your help<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Raymond Wagner <raymond@wagnerrp.com><br><b><span style="font-weight: bold;">To:</span></b> Discussion about MythTV
<mythtv-users@mythtv.org><br><b><span style="font-weight: bold;">Sent:</span></b> Thu, November 18, 2010 10:03:51 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mythtv-users] Myth and Python<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off">
On 11/18/2010 21:51, dvrhax wrote:
<blockquote type="cite">
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>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.<br>
</div>
</div>
</blockquote>
<br>
Altered version...<br>
<br>
<blockquote type="cite">
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>#!/usr/bin/python<br>
<br>
from MythTV import MythBE<br>
<br>
be = MythBE()<br>
db = be.db<br>
hostname = db.gethostname()<br>
<br>
print 'Host: %s Max Channels:
%s'%(hostname,mythtv.db.settings[hostname]['MaxChannels'])<br>
<br>
if db.settings[hostname]['MaxChannels']==u'2':<br>
db.settings[hostname]['MaxChannels']=u'6'<br>
elif db.settings[hostname]['MaxChannels']==u'6':<br>
db.settings[hostname]['MaxChannels']=u'2'<br>
<br>
print 'Host: %s Max Channels:
%s'%(hostname,mythtv.db.settings[hostname]['MaxChannels'])<br>
<br>
</div>
</div>
be.backendCommand('MESSAGE[]:[]CLEAR_SETTINGS_CACHE')<br>
</blockquote>
<br>
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.<br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>
</body></html>