Kodi Community Forum

Full Version: substring problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
I'm playing around tweaking alaska revisited, trying to learn some skinning and making a few personalizations.

I want to have blu-ray source flags for files that contain "[BD]" in the filename.
To achive this i tried to add
Code:
substring(listitem.filename,[bd])
to the visibility condition of the blu-ray flag.
This resulted in blu-ray flags appearing on all files. Not exactly what I wanted.

I tried removing the [] turning the expression into this
Code:
substring(listitem.filename,bd)
This appears to have fixed things and the blu-ray flag is now shown on the correct files. I feel that the string "bd" is slightly too broad though. I would very much like to include the brackets if at all possible.

My question is thus, why didn't it work with the brackets and how do I make it work with them included?
You do realise that Alaska will show the bluray flag if you have bluray in the file name anyway don't you?
Hitcher Wrote:You do realise that Alaska will show the bluray flag if you have bluray in the file name anyway don't you?

Yes I do, but thanks for pointing it out Smile
The reason I want to do this is that anime from blu-ray sources often is named with [BD] instead of bluray. I was hoping I could make it work without having to rename files.