Set custom passthrough device by Python (Dharma)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
el_Paraguayo Offline
Fan
Posts: 448
Joined: Feb 2011
Reputation: 7
Location: London, UK
Post: #1
I'm trying to set the audio outputs via a python script.

The relevant code is:
Code:
output = "plug:tvhdmi"
xbmc.executehttpapi('SetGUISetting(3; audiooutput.customdevice; %s)' % (str(output)))
xbmc.executehttpapi('SetGUISetting(3; audiooutput.custompassthrough; %s' % (str(output)))

The customdevice is changed correctly, but the custompassthrough doesn't get changed.

Here's the extract from my guisettings.xml file
Code:
<audiooutput>
        <ac3passthrough>true</ac3passthrough>
        <audiodevice>custom</audiodevice>
        <channellayout>0</channellayout>
        [b]<customdevice>plug:tvhdmi</customdevice>
        <custompassthrough>plug:dmixer</custompassthrough>[/b]


I know setGUIsetting is supposed to take a number between 0-2 but the string still seems to get set for the first setting.

Is it actually possible to do this via python? Seems odd that I can change one, but not the other.

Thanks,

el_P

MythSuspendAlarm: Suspend xbmc and set ACPI wake alarm based on next scheduled MythTV recording.
BBC Football Scores: Get live football score notifications.
Random Movie Script: Play random movies from user's library (for skinners).
find quote