Kodi Community Forum
Changes to the python API for Kodi Krypton - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Changes to the python API for Kodi Krypton (/showthread.php?tid=250936)

Pages: 1 2 3


Changes to the python API for Kodi Krypton - ronie - 2015-12-06

Below you'll find an up-to-date list of all changes made to the python API since the release of Kodi Jarvis.



Please keep this thread clean. It should be an easy overview for python coders who are updating their addon for Kodi Krypton.
For discussions / feature requests / bugreports, please find (or create) the appropriate thread in the addon development forum.



RE: Changes to the python API for Kodi K*** - ronie - 2015-12-06

2015-12-05 python 2.7.10 available on all platforms

the python version shipped with kodi has been updated to 2.7.10.

if your addons contains specific code to make it run under python 2.6,
you can now safely remove that code.


pull request: 8207 (PR)


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-06

2015-12-05 script.module.simplejon - no longer needed

as a result of the bump to python 2.7.10, the use of simplejon is no longer needed/recommended.
python 2.7.x contains a json module which is much faster than simplejson, so use that one instead


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-06

2015-12-05 PIL replaced with Pillow

we've replaced the PIL module shipped with Kodi with Pillow.
Pillow is fully backward compatible* with PIL, so this change should not cause any issues in your addon.
the script module will still be called script.module.pil

* the only differences are related to supported import methods
  • Pillow does not support 'import Image'. please use 'from PIL import Image' instead.
  • Pillow does not support 'import _imaging'. please use 'from PIL.Image import core as _imaging' instead.


pull request: 8207 (PR)


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-06

2015-12-06 xbmc.log() - default loglevel changed to xbmc.LOGDEBUG

to prevent the kodi.log from being spammed by addon logging,
we've changed the default loglevel for addons to DEBUG.

please do not use any other loglevels in addons you release to the public.
also, don't use 'print' statements in your addon as they will spam the regular log as well, always use xbmc.log() instead.
(print has been changed to logdebug level as well: 8316 (PR))


pull request: 8444 (PR)


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-09

2015-12-09 xbmcvfs.exists() - no caching

up 'till now xbmcvfs.exists(dir) would cache the result of the first check and return the result on subsequent checks.
this has been disabled now, as it could cause issues in addons.
see: 1899282 (post)


pull request: 8531 (PR)


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-19

2015-12-19 xbmc.RenderCapture() - changes

we've made the following changes to methods in the RenderCapture() class:


xbmc.RenderCapture().capture()
- removed the option to pass 'flags'

xbmc.RenderCapture().getCaptureState()
- this method has been removed

xbmc.RenderCapture().getImageFormat()
- image will now always be returned in BGRA

xbmc.RenderCapture().getImage()
- added the option to specify wait time in msec.

xbmc.RenderCapture().waitForCaptureStateChangeEvent()
- this method has been removed


pull request: 8613 (PR)


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-27

2015-12-27 python api bump

our python api has been bumped to 2.25.0

please keep the version your addon depends upon up to date!
(many addons still depend on 2.1.0, those will break once we remove backward compatibility to the 2.1.0 api)

Code:
2.14.0  -  Gotham 13.x
2.19.0  -  Helix 14.x
2.20.0  -  Isengard 15.x
2.24.0  -  Jarvis 16.x
2.25.0  -  K*** 17.x


pull request: 8505 (PR)


RE: Changes to the python API for Kodi K*** - ronie - 2015-12-29

2015-12-29 xbmc.Player() - changes

it is no longer possible to specify a PLAYER_CORE in the xbmc.Player class.
you'll have to use xbmc.Player() and kodi will auto-select the appropriate player.


pull request: 8525 (PR)


RE: Changes to the python API for Kodi Krypton - phil65 - 2016-02-15

2015-02-15 Content type changes

Bit late, but also probably worth mentioning here.
Image addons should set content type to "images" in case the list you´re displaying contains pictures.

git commit: https://github.com/xbmc/xbmc/commit/38436799438213b78ecbba222669d433220c148c
pull request: 8679 (PR)


RE: Changes to the python API for Kodi Krypton - ronie - 2016-02-15

2015-12-15 DialogSelect.xml - cancel button

in case your addon uses the WindowXMLDialog class to load DialogSettings.xml:
Code:
w = MainGui("DialogSelect.xml", CWD, listing=my_list)
w.doModal()

please note a new cancel button (id="7") has been added to this xml file.
your addon needs to control the visibility of this button, set the label and process the onclick of this button.


the above does *not* apply if you access the select dialog through the builtin xbmc.Dialog().select() method.

pull request: 8417 (PR)


RE: Changes to the python API for Kodi Krypton - ronie - 2016-02-26

2015-02-26 WindowXML - container properties

the method to set container properties, setProperty(), in the WindowXML class has been renamed to:
setContainerProperty()

That way WindowXML.setProperty() now behaves the same as Window.SetProperty().

pull request: 9187 (PR)


RE: Changes to the python API for Kodi Krypton - ronie - 2016-03-01

2015-02-26 New clothes for Kodi

in case your script includes a script window / dialog
and you've made it to match the look of Confluence,
please know that we now have a new default skin: Estuary.

you may to to update your script windows to match the look of Estuary.


pull request: 9235 (PR)


RE: Changes to the python API for Kodi Krypton - phil65 - 2016-03-07

2015-03-06 New methods for InfoTagVideo

added some new methods for xbmc.InfoTagVideo:

xbmc.InfoTagVideo.getTVShowTitle()
xbmc.InfoTagVideo.getMediaType()
xbmc.InfoTagVideo.getSeason()
xbmc.InfoTagVideo.getEpisode()


pull request: 9267 (PR)


RE: Changes to the python API for Kodi Krypton - ronie - 2016-04-08

2015-04-08 Additional infolabels

addons can now also set the following infolabels though the ListItem().setInfo() method:
  • imdbnumber : string (tt0110293) - IMDb code
  • set : string (Batman Collection) - name of the collection
  • setid : integer (14) - ID of the collection



pull request: 9570 (PR)