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

All your suggestions, requests and ideas for future development
Post Reply
User avatar
rednoah
The Source
Posts: 22966
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply