How to parse + (plus) sign in String comparsion operations
#1
Debug log gives me an error on string comparsion of the first condition:

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>

Log:

Code:
2024-05-04 10:07:44.474 T:1817    error <general>: unmatched parentheses in string.startswith(player.process(amlogic.eoft_gamut),hdr10
2024-05-04 10:07:44.475 T:1817    error <general>: unmatched parentheses in )

I guess this is related to issue #24337 : https://github.com/xbmc/xbmc/issues/24337

It's possible to mask/parse/replace the + sign in comparsions?
Reply
#2
Maybe try using the hex value?

&#x2b;
Reply
#3
Same error...
Reply
#4
Changing the logic might work:

xml:
<variable name="VideoresolutionFullScreenVar">
<value condition="String.IsEqual(Player.Process(amlogic.eoft_gamut),HDR10)">flags/fullscreen/hdr_fs.png</value>
<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),HLG)">flags/fullscreen/hlg_fs.png</value>
<value condition="String.StartsWith(Player.Process(amlogic.eoft_gamut),DV)">flags/fullscreen/dv_fs.png</value>
</variable>
Reply
#5
String.IsEqual() will not work because the returning value of amlogic.eoft_gamut) contains some more information e.g. HDR BT.2020nc or HDR+ BT2020nc and in case of Dolby Vision DV-Std BT.2020nc. Also since some studios extend there studio label from e.g. Paramount with Paramount+ or Disney with Disney+ the comparsion for this will be more and more difficult. This has already reported: https://forum.kodi.tv/showthread.php?tid...pid3177119 and a issue has taken on Kodi Bugtracker: https://github.com/xbmc/xbmc/issues/24337
Reply

Logout Mark Read Team Forum Stats Members Help
How to parse + (plus) sign in String comparsion operations0