Escaping a string?
#1
I have an expression where I’m testing for a file name with text ‘Quad+’ but it fails as it sees the ‘+’ as a string concatenation.

<value condition="String.Contains(Player.Filename,Quad+)">4.1</value>

How can I escape the plus sign?

THX
Reply
#2
not possible. but perhaps the workaround mentioned in this thread could also work for you: https://forum.kodi.tv/showthread.php?tid=352495
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Thanks ronie.

That's not going to work in my case but its a great idea:

Quote:what about this for HDR10+
String.Contains(ListItem.Filenameandpath,.HDR10) + !String.Contains(ListItem.Filenameandpath,.HDR10.)

And this for HDR10
String.Contains(ListItem.Filenameandpath,.HDR10.)

I've got hundreds of files and folders using the naming 'Quad+'. I guess I'll need to rename them all...
Reply
#4
It tied to a texture? If so this should work just fine. I have my movies show HDR10+
open image in a new tab to show better
Image


<control type="image">
<include>mediaflags_large_layout</include>
<texture background="true">$VAR[mediaflags_large_path]/video/hdr10+.png</texture>
<visible>String.Contains(ListItem.FileNameAndPath,hdr10+)</visible>
</control>
Reply



Logout Mark Read Team Forum Stats Members Help
Escaping a string?0
This forum uses Lukasz Tkacz MyBB addons.