Page 1 of 1

{resolution} binding does not work in FileBot 5.0.1 (it works but it works differently depending on the context)

Posted: 21 Mar 2023, 04:52
by rednoah
:arrow: https://discord.com/channels/2287231828 ... 5531441294
jaytee wrote:Hmmm. I think it was a typo, that used to work then stopped? I was using {-resolution} which gave e.g. "-1280x800", (which is the string shown at https://www.filebot.net/naming.html) but now gives nothing. My other bindings use the format of {'-'+resolution} , which gives "-[1280, 800]". I guess I can just use {-width+'x'+height}. Thanks!

{-resolution} is wrong, but works because FileBot implements String.negative() and just does '-' + self to make it work. Resolution is no longer a String object, so this code no longer works.


{ '-' + resolution } indeed results in -[3840, 2160] which is definitely a bug / unfortunate unintended side effect.
You can do this instead:

Code: Select all

-{resolution}

Code: Select all

{ '-' + resolution.toString() }


EDIT:

FileBot r9671 adds additional extension methods to make {-resolution} and {'-'+resolution} work again like before.