Kodi Community Forum
Creating profiles from within scripts - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Creating profiles from within scripts (/showthread.php?tid=69297)



Creating profiles from within scripts - wyrm - 2010-02-02

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 - 2010-02-06

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)


RE: Creating profiles from within scripts - rosaldanha - 2012-06-12

Thanks for your "auto-response" it helped me a lot !