Page 1 of 1

AMC: accessing a .sub file through {model}

Posted: 20 Nov 2017, 14:49
by thielj
When accessing a .sub file's lang property through the {model} binding, I get a " Subtitle format not supported" exception. No surprise, as these are no SubViewer or MicroDVD text based subs, but part of an idx/sub (VobSub) set.

Is there a more graceful way to figure out if the file is a supported subtitle?

Re: AMC: accessing a .sub file through {model}

Posted: 20 Nov 2017, 17:04
by rednoah
You could try something like this:

Code: Select all

model.findResults{ m -> any{m.lang}{null} }

Re: AMC: accessing a .sub file through {model}

Posted: 20 Nov 2017, 17:10
by thielj
....or a simple {call{it.lang}} - they are all just hiding the exception though ;)

BTW, this is mentioned as c{} in most forum posts but seems to have been changed at some point