Addon Kodi 18 / 19 published in the same repository
#1
Hi there!

I have a private repository to host a private addon currently developed in Python 2. I am doing the Python 3 migration now and I wonder if I can publish both versions at the same time in the repository, Kodi 19 downloading the Python 3 version and Kodi <19 keeping the python 2 version.

I guess that current best practice would be to rewrite the addon to be Python 2 and 3 compatible, but I would like to take advantage of new features/syntax in Python 3. I can keep the old Python 2 releases around until people upgrade to Kodi 19 and then the addon would be automatically (I hope) upgraded to the python 3 version.

Is this a fantasy of mine or could it work? Should I bite the bulled and do a hybrid release containing both Python 2 and Python 3 code? (or code written to be compatible with both, that is). I would like to avoid it if possible.

Thanks!
Reply
#2
I don't think it's possible. Some folks have done some work arounds (like not requiring a Python version for the addon if it's truly 2/3 compliant.
Reply
#3
@jcea It sounds like you're complicating what should be an easy decision. If you want to go Python3, go Python3, period. Kodi 19 will become the `current stable` release soon enough. Anyone choosing to stick with `old` previous versions are also choosing to stick with `old` addons that they can't expect to continue to be supported. The burden isn't on you to satisfy users who choose not to upgrade, the burden is on them choosing to fall behind. If they want to use your addon bad enough, they'll upgrade. If not, oh well, why is that your problem?
Reply
#4
@teriyaki
errrr, sometimes not that simple.
Does google stop supporting apps on Android 9 when 10 is released?
Did windows 7 stop working when rubbish windows 8 was released? thankfully not.

A lot of addons won't make it to Python3, therefore a lot of users will stay with Kodi 18.
Its also not always upto the user when they update. eg. Debian.
Its upto the distro to push the update and this can take quite some time.

I personally take the approach of trying to support Previous Version (17), Current Version (18), Future Version (19)
Yes, older versions may not have all the features but at least should work.

@jcea
Yes, you can have a single repo with both supported versions. However, you do need separate addons.xml & md5 files.

See this example of the addon.xml for inside the repo.
https://github.com/johnny5-is-alive/repo.../addon.xml

The key is the minversion and maxversion.
This makes the different Kodi versions read the correct file.

Also, remember to have Matrix version numbers higher than Leia.
That way your addons will automatically migrate if a user updates Kodi.
Reply
#5
@matthuisman 
We're not talking about search engines or OSes where there's hundreds & hundreds of millions, if not billions of users to consider so trying to compare a Kodi addon to Android, Windows, and Google is apples & airplanes. Regardless of why a user chooses to stick with an "old" Kodi, it is in fact their choice to do so. Nobody is forcing them, not even their distro. Kodi is Python3 moving forward regardless. If there's enough interest in the addon, either the author or the community will almost certainly update it or write a new one. I'm not against supporting multiple versions/apis/etc. but I stand by my statement that the burden is on the user, their choices are their problem, not the authors. If someone is willing to do the extra work, that's perfectly fine. But, users shouldn't expect continued support for aging software, which over time can become quite a hassle and certainly move past the point of diminished returns. I've found that devs that keep current keep active. Ones that drag along added baggage get tired of it and lose interest. There's no right or wrong, only how much work is acceptable to the dev.
Reply
#6
(2020-12-11, 03:16)matthuisman Wrote: @jcea
Yes, you can have a single repo with both supported versions. However, you do need separate addons.xml & md5 files.

See this example of the addon.xml for inside the repo.
https://github.com/johnny5-is-alive/repo.../addon.xml
Thanks @matthuisman. That example is really useful. I wonder about the version numbers. If "18.9.1" refers to a version after Kodi 18.9 (that is, if the version numbers is the Kodi release version), that example would break if Kodi ever publishes a 18.10 release. Maybe would be better to do "18.99.0". Am I misunderstanding the version numbers?

In any case, the example is useful. Thanks.
Reply
#7
correct, but there won't be an 18.10.
You could use 19.0.0 once 19 is out. That's using 18.9.1 as the alpha versions used 18.9.9 or something like that as version number (not 19)
Reply
#8
(2020-12-28, 20:18)matthuisman Wrote: correct, but there won't be an 18.10.
You could use 19.0.0 once 19 is out. That's using 18.9.1 as the alpha versions used 18.9.9 or something like that as version number (not 19)

No 18.10... Time will tell, but considering the big change that Python 3 migration is, I would be not so sure :-).

What is the release numbers of current Kodi 19 betas? I would guess "19.0.0" since branched from 18, but this is only a guess.
Reply
#9
First alpha version was 18.9.701

https://github.com/xbmc/xbmc/commit/f90a...63f3b1df4b

Current Beta 2 version is 18.9.821

There will be no 18.10
Reply
#10
(2020-12-29, 00:49)Fuzzard Wrote: First alpha version was 18.9.701

https://github.com/xbmc/xbmc/commit/f90a...63f3b1df4b

Current Beta 2 version is 18.9.821

There will be no 18.10

Humm... I think that numbering schema is a wrong choice, but life sucks.

Anyway this thread has been useful. Thanks.
Reply
#11
I think this hack kinda works for both 18 & 19, (tricky optional="true" flag)

Did not test in an actual repo, but when i install directly from filesystem and enable, it does not complain that it is not supported.

addon example:
https://github.com/hbiyik/repository.biy.../addon.xml
repo example:
https://github.com/hbiyik/repository.biy.../addon.xml


<import addon="xbmc.python" version="2.14.0" optional="true"/>
<import addon="xbmc.python" version="3.0.0" optional="true"/>


Above optional does work all the time, i have switched not to use any xbmc.python decleration in addon.xml and seems like it works
Reply



Logout Mark Read Team Forum Stats Members Help
Addon Kodi 18 / 19 published in the same repository0
This forum uses Lukasz Tkacz MyBB addons.