2017-06-07, 10:39
I've actually spent quite a bit of time on the python add-on integration in the last few days. It's still highly WIP and my python skills suck (I basically have to look up every other method call) but I've put together a python add-on at https://github.com/Montellese/xbmc/tree/...orter.emby which should basically replace the WIP I wrote in C++ for importing items from Emby. It's still very basic and therefore a lot of things are missing:
For the new add-on type it basically comes down to
Does that sound reasonable? I've basically looked at how plugin add-ons work and copied / refactored a lot of that. Once again I am no python developer so I have no idea what a sensible python API looks like
- the new API in the xbmcmediaimport module doesn't support handling media provider and media import settings yet
- the new API in the xbmcmediaimport module is completely undocumented
- the new add-on doesn't handle user authentication (it simply uses a hardcoded API key) which requires media provider settings (see above)
- the new add-on doesn't handle library views and everything is hardcoded
For the new add-on type it basically comes down to
- providing a service script which is responsible for discovering and registering media providers through the xbmcmediaimport module
- providing a library script which can handle different actions with the most important ones being "canimport" and "import" where for import you get a path and a list of media types to import and then you can do some magic, create ListItems and pass them back to Kodi which will then properly handle them as imported items.
Does that sound reasonable? I've basically looked at how plugin add-ons work and copied / refactored a lot of that. Once again I am no python developer so I have no idea what a sensible python API looks like