AMC: accessing a .sub file through {model}

All your suggestions, requests and ideas for future development
Post Reply
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

AMC: accessing a .sub file through {model}

Post 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?
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

You could try something like this:

Code: Select all

model.findResults{ m -> any{m.lang}{null} }
:idea: Please read the FAQ and How to Request Help.
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

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

Post 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
Post Reply