Getting the plugin userdata path

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tria Offline
Member
Posts: 90
Joined: Jan 2012
Reputation: 0
Post: #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
find quote
Martijn Offline
Team-XBMC
Posts: 10,993
Joined: Jul 2011
Reputation: 158
Location: Dawn of time
Post: #2
PHP Code:
__addon__       xbmcaddon.Addon(id='script.artwork.downloader')
__addondir__    xbmc.translatePath__addon__.getAddonInfo('profile') ) 

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
tria Offline
Member
Posts: 90
Joined: Jan 2012
Reputation: 0
Post: #3
Thanks, you are the greatest!
find quote
Martijn Offline
Team-XBMC
Posts: 10,993
Joined: Jul 2011
Reputation: 158
Location: Dawn of time
Post: #4
No problem. Those are the easy questions Wink

Feel free to ask more if you need some help

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote