Kodi Community Forum
Trim or extract substring from "$INFO[ListItem.Label]"? - 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: Trim or extract substring from "$INFO[ListItem.Label]"? (/showthread.php?tid=216342)



Trim or extract substring from "$INFO[ListItem.Label]"? - Psychobob - 2015-01-26

Greetings!

Within a skin's xml are you able to trim labels (or perform string manipulations)?

What I have is a set of filenames similar to "<REFERENCE_NO>-<TITLE>-<SOMETHING_ELSE>.mkv" (which is returned when you use $INFO[Listitem.Label] I believe). At the moment these are listed out like this and it is workable but I wanted to edit things so that I can split this up with carriage returns making it easier to visualize. So it would instead look more like:-

<TITLE>
<REFERENCE_NO>-<SOMETHING_ELSE>

However I haven't quite figured out if this is possible and if it is how you would do this. This isn't information that is in separate tags nor a library (for reasons I won't go into, I don't use a library), it's literally just in the filenames.

Am I overlooking something trivial?

I've searched for substring (which is a conditional check only type statement I believe) or trim but no luck so far. Hoping the veterans would be able to throw me a bone and help me out.

Thanks in advance


RE: Trim or extract substring from "$INFO[ListItem.Label]"? - phil65 - 2015-01-26

not possible, no methods available to manipulate strings on skin level.


RE: Trim or extract substring from "$INFO[ListItem.Label]"? - Psychobob - 2015-01-26

Dang, thanks for the quick reply.