New Addon Manager informations for developers.
#46
spiff Wrote:no. again, store data in special://profile/addon_data/<id>. you CANNOT assume that the main add-on dir is writable. e.g. somebody bundles your add-on with an installer - it goes to /usr/share/ on linux - nonwritable by mere mortals.
sorry my error .... I do write all to the addon-data directory, not to the addon-directory itself.
mea culpa mea culpa ...
Hans

PS : Is it ok to have the shell-scipts inside the addon-directory ? Or should the shell-scripts reside in the data-directory for the addon ?
Reply
#47
having them in the add-on dir is just fine (and makes the most sense) as long as they don't dump any data to that dir.
Reply
#48
I think it would be useful to have a small library that wraps commonly used methods like data paths, plugin state (read state from argv), file download/upload, caching and more.
With a good interface, this would ease development and debugging of scripts and plugins, and it might help creating more stable scripts. A intuitive API and good documentation is a must for success, and I think one of the more experienced plugin/script coders in here would manage such a project better that me, but I would definitely contribute

As an example of what one might want to have in such a library I refer to one of my plugins. I don't say my code is some super example tho :p and some of the code are kind of plugin specific

http://xbmc.git.sourceforge.net/git/gitw...101860f1b5

http://xbmc.git.sourceforge.net/git/gitw...101860f1b5
(the Key class I find very useful)
Reply
#49
we intend to add a extension point suitable for ^^^.

note victor-v; your nrk plugin violates what we have discussed further up here, and i have added the ability to mark stuff as borken in the repo now. as soon as the skin work is done, nrk will get stamped until this is resolved Smile
Reply
#50
spiff Wrote:we intend to add a extension point suitable for ^^^.

note victor-v; your nrk plugin violates what we have discussed further up here, and i have added the ability to mark stuff as borken in the repo now. as soon as the skin work is done, nrk will get stamped until this is resolved Smile

I don't know if I should feel like an idiot, or be glad it helps prove my point. :p
Reply
#51
heh, i was referring to the saving of data in the main dir, not the libraries Smile
Reply
#52
I'm using latest svn from today and I try to execute getAddonInfo("profile")
gets Error.
Reply
#53
it's definitely there.
Code:
PyDoc_STRVAR(getAddonInfo__doc__,
    "getAddonInfo(id) -- Returns the value of an addon property as a string.\n"
    "\n"
    "id        : string - id of the property that the module needs to access.\n"
    "\n"
    // Handle all props available
    "*Note, choices are (author, changelog, description, disclaimer, fanart. icon, id, name, path\n"
    "                    profile, stars, summary, type, version)\n"
    "\n"
    "       You can use the above as keywords for arguments.\n"
    "\n"
    "example:\n"
    "  - version = self.Addon.getAddonInfo('version')\n");
Reply
#54
linuxluemmel Wrote:I'm using latest svn from today and I try to execute getAddonInfo("profile")
gets Error.

it takes more than "getAddonInfo("profile")"


Code:
import xbmcaddon
__settings__ = xbmcaddon.Addon(id=<your script ID>)
print __settings__.getAddonInfo("profile")

should do the trick
Reply
#55
[

Code:
import xbmcaddon
__settings__ = xbmcaddon.Addon(id=<your script ID>)
print __settings__.getAddonInfo("profile")


Yes ... This was the trick ... ;-) Thanks
Reply
#56
Perhaps this has already been mentioned and I just missed it, but any chance of an xbmc.python.sharedlib type extension point? Would be nice to be able to have things like CryptoPy, simplejson, etc... in their own addons (and potentially included in the repositories) and just listed as requirements as opposed to being repeatedly included in every addon that needs them.
Reply
#57
Being able to reference stuff as pre-req and have them automatically installed would really be cool. But that should be something like "xbmc.python.module", not "sharedlib". In the meantime, you can always manually move this stuff into system/python/Lib and not worry about it. The hulu plugin uses CryptoPy but we just tell people to install it themselves, not bundle it into the plugin.
Reply
#58
I'm working on python modules at the moment. pysqlite2, cryptopy, pil will certainly be available. Will add simplejson to the list. XBMC will provide these for you. If the python module is non-binary then you can do one up yourself and we'll be happy to have it in the repo.

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


Image
Reply
#59
I have a question about Addon Repositories.
Could I produce a addon repositories on google-code ?
As it says here:
http://wiki.xbmc.org/index.php?title=Addon_Repositories
I should a have directory with the id of the addon.
I can not produce directorys inside google-code. But if there is only one addon, would it be possible no to use a directory and have all files insiode the root-folder download ?
I may could ask RIAA to host my addon ... LOL LOL .-)
http://www.riaa.com/
Of course this was a joke ,-)
As anybody a hint to store a ppa-repositorie ?
Cheers
Hans
Reply
#60
You don't need a directory with the id of the addon. Hitcher has a repository for Alaska Revisited on google code - pop over to the skin forums and see how he did it.

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


Image
Reply

Logout Mark Read Team Forum Stats Members Help
New Addon Manager informations for developers.0