Kodi Community Forum

Full Version: Creating profiles from within scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I'm trying to set-up a new profile from within a script, but the only thing that I can find in the wiki is the built-in commands 'MasterMode' and 'LoadProfile'. Is there a command for creating a profile, or do I need to write the profile information directly to the profiles.xml file and copy the master profile directory to the userdata directory? I'm not the worlds greatest python coder, so if there is something simple that I can use that would be preferable (less chance for me to stuff up a users set-up).

Wyrm (xTV SAF)
wyrm Wrote:Hi guys,

I'm trying to set-up a new profile from within a script, but the only thing that I can find in the wiki is the built-in commands 'MasterMode' and 'LoadProfile'. Is there a command for creating a profile, or do I need to write the profile information directly to the profiles.xml file and copy the master profile directory to the userdata directory? I'm not the worlds greatest python coder, so if there is something simple that I can use that would be preferable (less chance for me to stuff up a users set-up).

Wyrm (xTV SAF)

OK, have the answer myself.

1. add a profile section to the profiles.xml file (do this thru a script)
2. create a directory within the profiles directory that contains a valid guisettings.xml file, otherwise XBMC will create a default file for you.
3. load the new profile (use LoadProfile from within the skin or a script)

All turns out to be easier that I thought would be. XBMC does all the heavy lifting for you.

Wyrm (xTV SAF)
Thanks for your "auto-response" it helped me a lot !