rednoah wrote: ↑11 Sep 2020, 08:01
So we use
any to catch that error and print something else instead:
Code: Select all
{
any{ text.take(2).collect{ a ->
allOf
{ any{ a.LanguageString3 }{ 'XSX' }.upper() }
{ a.Format.removeAll('-') }
.join('-')
}.join(', ')
}{ 'No Subtitles' }
}
Thanks!!!, this works perfectly
rednoah wrote: ↑11 Sep 2020, 08:01
If you use
text on a file that does not contain any text streams, then the result will not be an empty list, but a binding error that unwinds the expression"
viewtopic.php?t=1895
I kinda realized the above when I was trying to resolve my issue and wrote the below piece of code.
Code: Select all
{{any{text.size} {0}} >=1 ?
{text.take(2).collect
{ a -> allOf
{ any{a.Language_String3.upper()} {'XSX'} }
{ a.Format.replace('-':'') }
}*.joining('-').join(', ')
}: 'No Subs'}
My code snippet above does not work as intended and just for my understanding/learning can someone please advise on what's wrong here?
I am using FileBot GUI and the format editor gives the following error with my code snippet above.
https://imgur.com/8OoUU64
...this again I am unable to understand due to my non-coding background
Please advise.
thanks,
~kg
ps: for some inexplicable reason when I put the error that I was getting in FileBot as a text in this response, I kept on getting an 'Internal Server Error' on the website each time I 'previewed' the response. So finally decided to make an image of the error text and post it's url