$PYTHON evaluations using 'in' is reversed, breaks a few skins (template.xml)
Closed this issue · 1 comments
The documentation states:
Whilst 'in' is available, for technical reasons its operation is reversed, so if you want to know if
x
is iny
, you'd useif y in x
.
However, after the py3 conversion, this is doubly reversed back to if x in y
.
This does break some skins like Aura and AuraMOD, the latter of which we used a workaround to prevent this issue, see this commit of skin.auramod (Kodi 19 migration status: WIP)
For example in Line 91 the existing code was:
$PYTHON['true' if widgetPath in 'plugin:' else 'false']
and the two methods to make this line work again are:
1 - $PYTHON['true' if 'plugin:' in widgetPath else 'false']
2 - $PYTHON['true' if widgetPath == 'plugin:' else 'false']
We used method 2 for future-proofing if this addon (script.skinshortcuts) is fixed and makes the python a little easier to read.
If this issue is fixed, it would prevent the need for other skins' shortcuts to be fixed, for example the original skin.aura by jurialmunkey and the respective Aura Kodi 19 port currently underway by kcook98765
Looks like this was previously resolved, please re-open if the issue persists