Open Yavos opened 8 months ago
Thank you for your contribution. The problem with removing the deprecated calls is, that the methods that do replace them are Kodi 20+ only, so it won't work for matrix. It makes it much more complicated to make changes to these two versions, because as of now, I can simply cherry-pick changes from one version to the other one, which I can't when I remove the deprecated methods for Nexus. It's already a mess backporting things to Leia, but having to juggle with three different versions, I'm not super excited about that. :)
I definitely have it on my list for Omega, but as of now, it just would make things more complicated to maintain and all it would do is reduce the amount of logging.
I understand that reasoning. I'll integrate it into mine anyway, since I only use Nexus upwards. Except for deprecation warnings it doesn't have an influence on the current versions, so it's fine to go without.
It'll still be helpful for Omega. ;)
I understand that reasoning. I'll integrate it into mine anyway, since I only use Nexus upwards. Except for deprecation warnings it doesn't have an influence on the current versions, so it's fine to go without.
It'll still be helpful for Omega. ;)
It's definitely helpful, so I'd keep that PR open if you don't mind.
A wild idea that came to my mind to have both worlds, is to extend the ListItem from Kodi with a wrapper class and use that one instead. I could still use things like e.g. setProperty
but I overload the original method in the wrapper class and decide which method to call on the original, parent, object, depending on the Kodi version. Not sure if python can do that and it's just a wild idea, but I found it an interesting idea and not too difficult to implement. Have to play around with that, when I find some free time. :)
I removed deprecated function calls (
ListItem.setInfo()
and parts ofListItem.setProperty()
) while trying to catch all possible errors with this. This makes the kodi log file for debugging a little cleaner.For more info on deprecated functions see:
Also added a language block in front of seasons that can be enabled in settings. (Disabled by default. Probably not the cleanest way to do that, but it works.)