Changes to the python API (and addon structure) for Kodi Matrix (v19)
#1
Below you'll find an up-to-date list of all changes made to the python API since the release of Kodi Leia.

List of changes so far:

Removed strings.xml support
monitor.onDatabaseUpdated and monitor.onDatabaseScanStarted removed
xbmc.python was bumped to version 3.0.0


previous threads:
Changes to the python API for Kodi Leia
Reply
#2
23-05-2019 - Removed strings.xml support (PR)

Kodi Matrix no longer supports the long deprecated strings.xml format. All addons must comply to the strings.po format. See https://kodi.wiki/view/Language_support#...strings.po
Reply
#3
Thanks. There is an error in the wiki. Currently the wiki shows in the example
Code:
#empty string with id 32003
But if I use it that way, Travis gives a syntax error on the strings.po when submitting the files
Travis only accepts when there is a space after the hash as follows
Code:
# empty string with id 32003
Kodi 18.9 x64 Windows | CoreELEC 9.2.5 Amlogic-ng S905X
Reply
#4
thx, corrected
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
03-06-2019 - xbmc.Monitor().onDatabaseUpdated() and xbmc.Monitor().onDatabaseScanStarted() were removed  (PR)

Both monitor class methods were deprecated since Helix in favor of onScanStarted() and onScanFinished(). Any uses of the deprecated methods should be adjusted to the current counterparts.
Reply
#6
21-10-2019 - xbmc.python was bumped to version 3.0.0  (PR)

If you plan to submit on addon to the addon repo for kodi matrix, please set xbmc.python to 3.0.0
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
23-03-2020 Removal of deprecated features (PR)

Removed
xbmc.monitor().onAbortRequested()

xbmcgui.DialogBusy()
xbmcgui.DialogBusy().create()
xbmcgui.DialogBusy().update()
xbmcgui.DialogBusy().iscanceled()

xbmcgui.ListItem().setIconImage()
xbmcgui.ListItem().setThumbnailImage()
xbmcgui.ListItem().getdescription()
xbmcgui.ListItem().getduration()
xbmcgui.ListItem().getfilename()

xbmcgui.Window().getResolution()
xbmcgui.Window().setCoordinateResolution()

Changed Method parameters - Removed

ControlEdit - removed isPassword
ControlRadioButton - removed focusTexture, noFocusTexture

xbmcgui.Dialog().yesno() - Removed Line2, Line3
xbmcgui.Dialog().cancel() - Removed Line2, Line3
xbmcgui.Dialog().ok() - Removed Line2, Line3

xbmcgui.DialogProgress().create() - Removed Line2, Line3
xbmcgui.DialogProgress().update() - Removed Line2, Line3

xbmcgui.ListItem() - Removed iconImage, thumbnailimage
Reply
#8
23-03-2020 xbmcgui.Dialog().yesno() - add support for custom button
besides the 'yes' and 'no' buttons, a third 'custom' button is now available.

https://github.com/xbmc/xbmc/pull/17494
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
2020-03-16 Changed built-in commands

not a python api change, but it might affect addons as well:
the use of an XBMC. prefix for built-in commands is no longer supported.

for example, this is no longer supported:
xbmc.executebuiltin('XBMC.ActivateWindow(Videos)')
you'll have to use this instead:
xbmc.executebuiltin('ActivateWindow(Videos)')

pull-request: https://github.com/xbmc/xbmc/pull/17457
commit: https://github.com/xbmc/xbmc/commit/3b35...b7736704fb
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#10
Recently Kodi 19 moved to using spdlog in its core. This meant a cleanup of the log levels kodi has had for many years. The xbmc.LOGNOTICE level is now redundant and xbmc.LOGINFO should now be used instread. Kodi will then use the following set of levels for logging: DEBUG, INFO, WARNING, ERROR and FATAL. The deprecated log levels have all been changed in Kodi code in this PR: https://github.com/xbmc/xbmc/pull/17730.The xbmc.LOGNOTICE level will deprecated from all APIs by the end of June.

Forum post: https://forum.kodi.tv/showthread.php?tid...pid2943669
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#11
24 April 2020 - xbmc.makeLegalFilename() was moved to the xbmcvfs module (xbmcvfs.makeLegalFilename())

Method was using arguments still from the xbox days, and is a vfs related method. Documentation was also improved: https://codedocs.xyz/xbmc/xbmc/group__py...918cd40491

PR: https://github.com/xbmc/xbmc/pull/17735
Reply
#12
13 May 2020 -  xbmc.abortRequested flag was removed completely.

This old flag was used to notify any scripts (injected in the path before loading any script) that abort was requested from kodi. It was deprecated for a long time and was not even documented in the python API. If your addon uses such flag, please adjust your addon to use a monitor instance instead: xbmc.Monitor().abortRequested()

PR: https://github.com/xbmc/xbmc/pull/17789
Reply
#13
25 April 2020 - xbmc.validatePath() was moved to the xbmcvfs module (xbmcvfs.validatePath())

As this method is a vfs related method, it has been moved to the xbmcvfs module.

PR: https://github.com/xbmc/xbmc/pull/17750
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#14
01 September 2020 - xbmc.translatePath() was moved to the xbmcvfs module (xbmcvfs.translatePath())

As this method is a vfs related method, it has been moved to the xbmcvfs module.

xbmc.translatePath() is now deprecated, it still works but will be removed in the future.
please update your code!

PR: https://github.com/xbmc/xbmc/pull/18345
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply



Logout Mark Read Team Forum Stats Members Help
Changes to the python API (and addon structure) for Kodi Matrix (v19)0
This forum uses Lukasz Tkacz MyBB addons.