System.ExecBG() API function request
#1
Lightbulb 
Hello, everyone.

I really enjoy the flexibility of XBMC's scripting and skinning API, and I've forked Confluence to better fit into my home theatre setup.

I've installed IR blasters (using the iguanaIR) on all of my equipment (Yamaha RX-V465 receiver, Optoma HD20 projector) and use LIRC's irsend to control them (power, volume). An Apple Remote is then used to get input into XBMC (also using iguanaIR).

I implemented the receiver volume control functionality into XBMC by setting my remote.xml keymap file to call System.Exec("volup/voldown") whenever the remote's up/down buttons are pressed during fullscreen video playback. (volup/voldown are scripts that call irsend) However, here I ran into a major problem. Both Exec() and ExecWait() minimise XBMC before execing my scripts. I traced the culprit to "xbmc/interfaces/Builtins.cpp" (line 390 at time of writing) where a Minimise method is explicitly called. I commented these lines out, built XBMC from source and now Exec() works exactly as I want.

Now, I run XBMC on a custom debian server with no desktop manager and an init.d script to launch XBMC as my de-facto "desktop" (similar to XBMC Live). In my case, XBMC just went into windowed mode since there is no desktop manager to handle a minimise.

However, seeing as it's impractical for everyone to build XBMC from source, I propose the addition of an ExecBG (or similarly named) function to the API to perform the exec without the minimise.

On a side note, I modified the Shutdown Menu (DialogButtonMenu.xml in Confluence's sources) to only have one button that calls irsend, shutting off the projector.

As far as I can tell, my (minor) patch has no side effects on XBMC's functionality and things work just fine. Although I imagine this is something that many users would find useful.

Let me know what you guys think.

Thanks!
Reply
#2
A decent but semi-hacky workaround is to use the "RunScript" function to execute a python script that in turn executes your shell script.

This keeps XBMC from minimizing and doesn't require a source build.
Reply

Logout Mark Read Team Forum Stats Members Help
System.ExecBG() API function request0