Kodi Community Forum
Determine userdata location? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Determine userdata location? (/showthread.php?tid=51316)



Determine userdata location? - Imaginos - 2009-05-19

Hello there

I'm building a software and the install needs to find whether xbmc is configured to use the user folder or the main xbmc folder

I can't just look for if some files are present, after all, one can has used one mode and then another, leaving files in folders that are not used
And I can't find infos in the wikki
So is this information stored somewhere ?

Thanks


- spiff - 2009-05-19

g_application.PlatformDirectoriesEnabled()

that being said; userdata is always available as special://userdata/


- Imaginos - 2009-05-25

well special://userdata/ is accessible by xbmc
Should I search through the hd to find xbmc.log to gather the datas ?


- althekiller - 2009-05-25

Imaginos Wrote:Should I search through the hd to find xbmc.log to gather the datas ?

That would be painfully slow. Why not just require the user specify their userdata path?


- Imaginos - 2009-05-25

I prefer to trust files and datas than end user Smile
Some don't understand the meaning of some choices...

Anyway, I decided to use the registry to get the windows userprofile, then I can find the xbmc.log, wich gives me all I need (masterprofile, home, exe folder...) thus I can store them in a xml file.
Huummm is there another possible location for the xbmc.log ?


- BrokenCodes - 2009-05-25

%userprofile%\XBMC\userdata


- Imaginos - 2009-05-25

you mean xbmc.log can be in %userprofile%\XBMC\userdata AND/OR %userprofile%\XBMC ?


- BrokenCodes - 2009-05-25

heh lol? No, I stated what I meant.