Xbmc: Addon Settings: Separator Visibility

Created on 14 Dec 2018  路  10Comments  路  Source: xbmc/xbmc


Bug report

Describe the bug

This is not a problem in Kodi 17 and earlier, only in Kodi 18. Kodi 18 ignores the "visible" option of a separator in the addon's settings.xml. This happens to both "lsep" and "sep":

<setting id="test" type="bool" label="MyLabel" default="true" />
<setting type="lsep" label="MyLabel" visible="eq(-1,true)" />
<setting type="sep" visible="false" />

Expected Behavior

The expected behavior is that the separators are hidden if their "visible" condition is disabled (either set to "false" or otherwise false through a condition).

Actual Behavior

The actual behavior is that the separators are still visible, even if "visible" is set to "false". This ONLY happens with separators, all other setting types seem to work correctly. In previous Kodi versions, the separators were hidden correctly.

Possible Fix

Don't know. Somewhere the "visible" condition is ignored by separators.

To Reproduce

  1. Just create a default addon and add a separator to the settings.xml.
  2. Set "visible" to false and the separator XML element.
  3. Open the settings dialog in Kodi 18.
  4. The separator still shows and is not hidden.

Debuglog

There is nothing in the debug log. This doesn't crash Kodi, it simply doesn't work as expected.

Your Environment

Used Operating system:

  • [ ] Android
  • [ ] iOS
  • [x] Linux
  • [ ] OSX
  • [ ] Raspberri-Pi
  • [x] Windows
  • [ ] Windows UWP
  • Operating system version/name: Windows 7, Windows 10, Ubuntu 16, Ubuntu 18 (and this will most likely happen on all OSs)
  • Kodi version: 18.0 RC2


note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

Settings v18 Leia v19 Matrix

All 10 comments

We also have some strange behavior with our add-on settings on Kodi 18.

Something like that doesn't work anymore:

<setting label="Live TV" type="bool" id="live_tv" default="true"/>

[...]

<setting label="" type="bool" id="live_tv" visible="false"/>
<setting label="Hide live TV countries" type="lsep" visible="eq(-1,true)"/>
<setting label="France" type="bool" id="fr_live" default="true" visible="eq(-2,true)"/>
<setting label="Spain" type="bool" id="es_live" default="true" visible="eq(-3,true)"/>

@SylvainCecchetto Not sure which of those elements you are referring to. But if it is "live_tv" where you have two instances of the same settings, isn't this rather the bug of #15252 ?

Thank you @goocreations, is it exactly the bug of #15252 that I want to highlight.
I will take a look.

This bug is still present in stable 18.2 and matrix.

No workaround, making our setting window more clutter.

We are also affected by this regression. emilsvennesson/script.module.inputstreamhelper#189

This is still an issue in Kodi 18.6

@Montellese can you take a look into this? I think this one of the last issues with the old settings format. Also, not sure if it is possible to replicate the same functionality in the new-settings style

@enen92 any documentation on 'new-settings style' so We can adapt?

@bigretromike there's no documentation AFAIK unfortunately. However there's a migration addon by @ronie that automatically tries to convert the old-style to new style. Maybe he can comment/help you with that

in the new style settings, you can apply the visible condition to each of the settings within a group.
then the group will be hidden.

i haven't found an easier way.

a link to the tool and some wiki documentation can be found here:
https://forum.kodi.tv/showthread.php?tid=350135

Was this page helpful?
0 / 5 - 0 ratings