Thread Rating:
  • 0 Vote(s) - 0 Average
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



Getting the plugin userdata path00