2014-10-08, 00:09
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:
the volume is set before changing the audio device and the bar is not displayed on the screen!
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...)!
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!
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...)!