Posts: 164
Joined: Nov 2015
Reputation:
6
2018-08-16, 14:14
(This post was last modified: 2018-08-17, 09:15 by bigretromike.)
so basically with help of your module we will be converting our python2 projects to python3 projects.
then we will add your module on top of it and it will handle string vs unicode conversion inside our python3 compatible addon so its compatible with python2 (pre kodi 19.0) ?
Also we need to handle other aspect of compatibility like using proper urllib etc.
Posts: 1,663
Joined: Jun 2011
Reputation:
119
I'm not sure what you are asking but kodi-six only normalizes string handling in Kodi Python API function/method arguments and return values. Everything else you need to do yourself.
Posts: 1,663
Joined: Jun 2011
Reputation:
119
I have released the new version 0.1.0 (back-ported to gotham branch as 0.0.4) with changes that should bring major start-up performance improvements, especially on low-CPU platforms like Pi. Previously, if, for example, you did from kodi_six import xbmc
all classes and functions from xbmc module were patched on import regardless on if they were actually used in the code, which slowed down addon start-up. Now patching is done lazily only when a specific function or class is first used, so, e.g. if you call xbmc.log(), log() function is patched on the first call and reference to the patched function is stored for further usage.
Posts: 30
Joined: Jun 2017
Reputation:
1
Really stupid question, is this module in the kodi.tv repo so another Kodi device will be able to find and install this as a dependency?
Posts: 785
Joined: Feb 2015
Reputation:
38
Rechi
Team-Kodi Member
Posts: 785
Yes it is available in the Official Kodi Repository.
Posts: 1,663
Joined: Jun 2011
Reputation:
119
There's not much that can be done if user's database contains textual information encoded not in UTF-8.
Posts: 1,663
Joined: Jun 2011
Reputation:
119
Yes, my bad. I did not test it properly in Python 2. I don't want to add extra dependencies so I'll use "replace" error handler instead.
Posts: 17
Joined: Jul 2011
Reputation:
0
Borre
Junior Member
Posts: 17
Thanks for the fix in 0.1.3! The fanart error issue at Kodi startup is gone now.