String compare issue with special character
#1
I had to compare an output from a Player.Process(eoft_gamut) info label and using

Code:
<variable name="VideoresolutionFullScreenVar">
    <value condition="String.StartsWith(Player.Process(amlogic.eoft_gamut),HDR10+)">flags/fullscreen/hdrplus_fs.png</value>
    <value condition="String.StartsWith(Player.Process(amlogic.eoft_gamut),HDR10)">flags/fullscreen/hdr_fs.png</value>
    <value condition="String.StartsWith(Player.Process(amlogic.eoft_gamut),HLG)">flags/fullscreen/hlg_fs.png</value>
    <value condition="String.StartsWith(Player.Process(amlogic.eoft_gamut),DV)">flags/fullscreen/dv_fs.png</value>
</variable>

HDR10+ is not detected (always using condition of HDR10), even the info label is showing HDR10+ in Player Process info. Maybe "+" needs a special handling or is this a bug?
Reply
#2
I use - as a string compare just fine.

Try using string contains + and see if it gets validated.
Reply
#3
I also found that the '+' character brings issues. When I try to show logo movie studios using an image control with...

code:
<texture>$INFO[ListItem.Studio,resource://resource.images.studios.white/,.png]</texture>

...Disney+ and Apple TV+ refuse to show even though Disney+.png and Apple TV+.png do exist. I still haven't found any fix for that...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#4
I did take some other investigation. Filled a Window property <onload>SetProperty(varcheck,HDR+,home)</onload> and evaluate this: <value condition="String.Contains(window(home).Property(varcheck),HDR+)">flags/fullscreen/hdrplus_fs.png</value>. HDR+ will not be treated. Changing HDR+ against HDR- or HDR only and changed the value condition too, all is fine. So it's a bug.

EDIT: Have opened an issue on bug tracker: https://github.com/xbmc/xbmc/issues/24337
Reply

Logout Mark Read Team Forum Stats Members Help
String compare issue with special character0