<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>Anyone with experience using either python and the Myth bindings or mysql directly with the myth database? I wrote the below script to toggle back and forth between 5.1 audio and stereo audio so that I didn't have to go through setup every time I wanted to use my surround system. 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><br>Any ideas would be appreciated.<br><br>Thanks<br><br>#!/usr/bin/python<br><br>import MythTV<br><br>from socket import gethostname<br>hostname = gethostname()<br><br>#Alternate May be necessary on
windows<br>#import platform<br>#hostname=platform.node()<br>mythtv=MythTV.MythTV()<br><br>print 'Host: %s Max Channels: %s'%(hostname,mythtv.db.settings[hostname]['MaxChannels'])<br><br>if mythtv.db.settings[hostname]['MaxChannels']==u'2':<br> mythtv.db.settings[hostname]['MaxChannels']=u'6'<br>elif mythtv.db.settings[hostname]['MaxChannels']==u'6':<br> mythtv.db.settings[hostname]['MaxChannels']=u'2'<br><br>print 'Host: %s Max Channels: %s'%(hostname,mythtv.db.settings[hostname]['MaxChannels'])<br><br></div>
</div><br>
</body></html>