Release AUTOMATIC (and/or manual) AUDIO SWITCHER for different Audio Output
#22
Another step!

I found that the correct file to modify was the script default.py (in the meanwhile I also learned that the number of spaces are fundamental when writing code in python!).

So now the voulme is correclty set to 100! The only remaining issue is that the volume bar appears on the screen...I would prefer having it hide...

Let me think about that...

- - - Edit - -

Even better with the following:

Code:
def set_audiodevice(dev,pt,ch):
       xbmc.executebuiltin("SetVolume(100)")
       xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.audiodevice","value":"%s"},"id":1}' % dev)
       xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.passthrough","value":%s}, "id":1}' % pt)
       xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.channels","value":%s}, "id":1}' % ch)

the volume is set before changing the audio device and the bar is not displayed on the screen! Cool

Sorry for boring you guys, but I think that is always a good thing to share the information (even if ofr someone could be quite simple...)!
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
Reply


Messages In This Thread
RE: AUTOMATIC (and/or manual) AUDIO SWITCHER for different Audio Output - by axlt2002 - 2014-10-08, 00:09
Logout Mark Read Team Forum Stats Members Help
AUTOMATIC (and/or manual) AUDIO SWITCHER for different Audio Output1