Variable for labeling question - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: Variable for labeling question (/showthread.php?tid=348691) |
Variable for labeling question - spl147 - 2019-10-24 i am currently using: <!--Video Resolution Label--> <variable name="PlayerVideoResolution"> <value condition="String.IsEqual(VideoPlayer.VideoResolution,1080)">1080P</value> <value condition="[String.Contains(Player.Filenameandpath,.HDR.) + String.IsEqual(VideoPlayer.VideoResolution,4K)]">4K HDR10</value> <!--value condition="[String.Contains(Player.Filenameandpath,.HDR10+.) + String.IsEqual(VideoPlayer.VideoResolution,4K)]">4K HDR10+</value--> <value>$INFO[VideoPlayer.VideoResolution]</value> </variable> to set the resolution label in the VideoFullScreen.xml, i am trying to add a label for 4K HDR10+, see the commented out value above in red. in the current form above, 1080P and HDR10 work perfectly, but if i uncomment the HDR10+ line both HDR10 and HDR10+ stop working and just display 4K. is it possible to have both in a single variable? is my syntax incorrect? RE: Variable for labeling question - vitorp07 - 2019-10-24 I could be wrong but I think you can't use some special characters like the "+" sign for the string inside the xml tag directly, did you try escaping the "+"? Instead of "+" try with "& #43;" without the the space between "& #" and without the double quotes or "+" without the double quotes. Useful info EDIT: if those are local files, you might be better of renaming them and exclude the + sign to something like this ".HDR10plus." RE: Variable for labeling question - ronie - 2019-10-25 the problem is indeed the + .when evaluating a condition, kodi searches the condition for + and | characters.a + is considered a 'logical and'.a | is considered a 'logical or'.there should be an error in your log indicating kodi can't parse that condition. afaik there is no workaround for this.. RE: Variable for labeling question - spl147 - 2019-10-25 (2019-10-24, 23:59)vitorp07 Wrote: I could be wrong but I think you can't use some special characters like the "+" sign for the string inside the xml tag directly, did you try escaping the "+"? i ended up using this: HDR10plus |