Always load a certain profile on xbmc startup
#1
Hey all,

I'm mucking around with profiles to make it easier to switch between audio outputs, I want to setup a main profile which will be used the majority of the time to output 2ch analog audio via hdmi and and a second profile to output via s/pdif for surround/louder sound. I'd like xbmc to always launch with the hdmi profile, but it seems that xbmc loads which ever profile was last used. I've had a look through the wiki pages for advancedsettings.xml and profiles but didn't see anything relating to this and there seems to be no command line switches to load a particular profile.

Is this possible to always start xbmc with a particular profile?
Reply
#2
Not currently, nope. You could probably hack it by modifying profiles.xml using a script before XBMC starts, but that is not recommended.

A patch would be considered I would think - eg by having a alwaysloadatstart tag or similar in profiles.xml - no need for any UI necessarily.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
You could use an autoexec.py script:

Code:
import xbmc

xbmc.executebuiltin("Loadprofile(hdmi)")

You'd need to put this in the userdata folder of all profiles.

JR
Reply
#4
Thanks I'll look into the autoexec.py method.

Just out of curiosity what programming language would I need to learn to make a patch such as the one jmarshall suggested? I'm guessing C/C++ from a quick glance at the xbmc development wiki?
Reply
#5
Yep, it's C++
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#6
(2012-03-19, 11:16)jhsrennie Wrote: You could use an autoexec.py script:

Code:
import xbmc

xbmc.executebuiltin("Loadprofile(hdmi)")

You'd need to put this in the userdata folder of all profiles.

JR

I'm trying to do this but this way XBMC is alwais changing from one profile to another Sad
It seems that autoexec.py executes when the the profile is loaded, not only once when XBMC is loaded.
I'm using OpeneELEC 3.0.3
Reply
#7
Maybe you shouldn't put the autoexec.py script to load a profile in the user data folder of the profile you want to load?

EDIT: on second thought that would defeat the purpose of profiles as only one profile would load...
Reply
#8
Just stumbled across this

http://forum.xbmc.org/showthread.php?tid=143455
Reply

Logout Mark Read Team Forum Stats Members Help
Always load a certain profile on xbmc startup0