Red, I'm stuck again...
The {subt} binding is coming back as UNDEFINED.
I have not tried it before, so it's not 'broken now' as I don't know if it would have worked for me before.
My Filebot program files are dated 4/20/16, which the current installation creates.
The JAR file is the current one I downloaded today.
I've un- and re- installed everything.
Still, no {subt} binding.
Any ideas?
Help needed - {Subt} binding
Re: Help needed - {Subt} binding
If {subt} doesn't work, then probably neither does {lang}.
Keep in mind:
* {subt} will only be defined for subtitle files
* {subt} will work better if files are named correctly, e.g. name.eng.srt
* {subt} uses statistical language detection as a last resort, it's not 100% and it won't work for empty test files or non-text files
What are the filenames? Do you have a link for that specific subtitle file?
Keep in mind:
* {subt} will only be defined for subtitle files
* {subt} will work better if files are named correctly, e.g. name.eng.srt
* {subt} uses statistical language detection as a last resort, it's not 100% and it won't work for empty test files or non-text files
What are the filenames? Do you have a link for that specific subtitle file?
Please read the FAQ and How to Request Help.
-
- Power User
- Posts: 89
- Joined: 01 Feb 2014, 16:59
Re: Help needed - {Subt} binding
Hmmm... nope, I wasn't looking at external files; I assumed it would identify embedded subs.
That's what I'd like to do now - add a format to flag files with subs in them - as I convert a large library, I'm adding embedded subs, but would like to identify if they already exist.
I'm not expecting to identify commentaries vs. regular subs, but that would also be nice.
If it's not part of FB or the API, then no worries...
If this is possible, then what I'd like to do:
- count the number of embedded sub streams.
- bring back the NAME of the streams (I'm naming them 'Main Audio' and 'Commentary', for example) if a name exists (older files have no description for the sub stream).
Thanks.
That's what I'd like to do now - add a format to flag files with subs in them - as I convert a large library, I'm adding embedded subs, but would like to identify if they already exist.
I'm not expecting to identify commentaries vs. regular subs, but that would also be nice.
If it's not part of FB or the API, then no worries...
If this is possible, then what I'd like to do:
- count the number of embedded sub streams.
- bring back the NAME of the streams (I'm naming them 'Main Audio' and 'Commentary', for example) if a name exists (older files have no description for the sub stream).
Thanks.
Re: Help needed - {Subt} binding
1.
{subt} is what allows you to do things like:
2.
You'll want to look into the {text} binding. Use the integrated Binding/MediaInfo inspector to see what kind of information you can extract from the file contents.
{subt} is what allows you to do things like:
Code: Select all
movie.avi
movie.eng.srt
movie.ger.srt
2.
You'll want to look into the {text} binding. Use the integrated Binding/MediaInfo inspector to see what kind of information you can extract from the file contents.
- count the number of embedded sub streams.
Code: Select all
{text.size()}
Please read the FAQ and How to Request Help.
-
- Power User
- Posts: 89
- Joined: 01 Feb 2014, 16:59
Re: Help needed - {Subt} binding
Great, thanks - {text} is the start I need...
After some trials, I seem to be unable to return a 'zero' value, if there are no subtitles (embedded).
What I'd like to do is add code like this:
but I've had to whittle it down to this:
as I get a null pointer exception by simply using {text.size} where there are no subs.
Problem is, I wind up with "1 Audio & 1 Subs" for valid subtitled files, and "1 Audio & Subs" instead of "1 Audio & 0 Subs" as I'd like.
I've tested a number of null pointer catches via various Groovy code sites, without luck.
I'm wondering if it's in fact, 'null' as opposed to 'invalid'.
Any thoughts on how I can identify >= 1 sub, and replace all other values (zero, null, invalid...) with a 'zero'?
After some trials, I seem to be unable to return a 'zero' value, if there are no subtitles (embedded).
What I'd like to do is add code like this:
Code: Select all
{audio.size+' Audio &'} {text.size+' Subs'}
Code: Select all
{audio.size+' Audio &'} {if(text.size != null) text.size else '0'}{' Subs'}
Problem is, I wind up with "1 Audio & 1 Subs" for valid subtitled files, and "1 Audio & Subs" instead of "1 Audio & 0 Subs" as I'd like.
I've tested a number of null pointer catches via various Groovy code sites, without luck.
I'm wondering if it's in fact, 'null' as opposed to 'invalid'.
Any thoughts on how I can identify >= 1 sub, and replace all other values (zero, null, invalid...) with a 'zero'?
Re: Help needed - {Subt} binding
Use any(Closure...) like this:
@see viewtopic.php?f=5&t=1895
Code: Select all
{any{audio.size}{0}} Audio & {any{text.size}{0}} Subs
Please read the FAQ and How to Request Help.
-
- Power User
- Posts: 89
- Joined: 01 Feb 2014, 16:59
Re: Help needed - {Subt} binding
Simple, elegant... thanks very much... AGAIN!