Getting the plugin userdata path
#1
Hi,

Each plugin have a dedicated directory for it's own data for the user profile, usually (in Winodws, but in similar places in other OSs): %AppData%/XBMC/userdata/addon/plugin.name.here/
How do I get this path to store my file in a cross-platform way (won't break if I change system). It would be great if the path is under to the userdata of the current profile (or the master profile if it is the current one)

Thanks
Reply
#2
PHP Code:
__addon__       xbmcaddon.Addon(id='script.artwork.downloader')
__addondir__    xbmc.translatePath__addon__.getAddonInfo('profile') ) 
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Thanks, you are the greatest!
Reply
#4
No problem. Those are the easy questions Wink

Feel free to ask more if you need some help
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
Thanks! Easy but essential for new developers Smile
Reply
#6
Question 
(2012-03-08, 20:53)Martijn Wrote:  
PHP Code:
__addon__ xbmcaddon.Addon(id='script.artwork.downloader')
__addondir__ xbmc.translatePath__addon__.getAddonInfo('profile') ) 

I'm a kodi dev noob, but how are xbmc and xbmcaddon imported?
Reply
#7
Information 
(2019-08-09, 00:16)PoolloverNathan Wrote:
(2012-03-08, 20:53)Martijn Wrote:
PHP Code:
__addon__ xbmcaddon.Addon(id='script.artwork.downloader')
__addondir__ xbmc.translatePath__addon__.getAddonInfo('profile') ) 

I'm a kodi dev noob, but how are xbmc and xbmcaddon imported? 
Hacked lambda scrapers, found out that they're toplevel modules. Nevermind.
Reply

Logout Mark Read Team Forum Stats Members Help
Getting the plugin userdata path0