Kodi Community Forum

Full Version: [REQUEST] <constant> tag allows not only numerically values
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
the problem is:

I would like to use wraplist and fixedlist in the tv shows on different conditions.
That it would be good if <constant> not only numerical values would support.

example:
Code:
<include name="MultiplexFixedList">
   <constant name="MultiplexListType">fixedlist</constant>
</include>
<include name="MultiplexWrapList">
   <constant name="MultiplexListType">wraplist</constant>
</include>

<include condition="Skin.HasSetting(SeasonsFixedList)">MultiplexFixedList</include>
<include condition="Skin.HasSetting(!SeasonsFixedList)">MultiplexWrapList</include>
<control type="MultiplexListType" id="52">
   ...
</control>
or better with conditional function in <constant> tag:
example:
Code:
<constant name="MultiplexListType" condition="Skin.HasSetting(SeasonsFixedList)">fixedlist</constant>
<constant name="MultiplexListType" condition="Skin.HasSetting(!SeasonsFixedList)">wraplist</constant>

<control type="MultiplexListType" id="52">
   ...
</control>
so you do not have to write multiple lists with the same id
If it is conditional it isn't a constant.

There's a ticket on trac for skin variables. This is the exact same idea.

It's awaiting someone to provide a patch.

Cheers,
Jonathan