Page 1 of 1

5.0.0 Binding "original": undefined

Posted: 17 Mar 2023, 13:03
by sentience
Since upgrading to Filebot 5.0.0, it's failing to process any format string containing the binding 'original', such as:

Code: Select all

{original}
{emby} - {original}
{emby.derive(" - $original")}
As this binding is still documented, I gather this must be a bug.

Re: 5.0.0 Binding "original": undefined

Posted: 17 Mar 2023, 13:49
by rednoah
{original} refers to the original file name that was stored to xattr metadata the first time the file was renamed with FileBot. {original} is always undefined if the file at hand has never been renamed with FileBot.


:?: Perhaps you mean to use the {fn} current filename in your format?

Re: 5.0.0 Binding "original": undefined

Posted: 22 Mar 2023, 02:44
by sentience
Weird. {original} worked prior to 5.0.0 on previously-unrenamed files.

I'll give {fn} a try!

Re: 5.0.0 Binding "original": undefined

Posted: 22 Mar 2023, 02:55
by rednoah
{original} did indeed default to the current filename, but that made the binding less versatile and less well-defined and prone to misinterpretation. It can be a problem when a bindings work one way in one context, and another way in another context.


:arrow: You can use {original} and explicitly default to {fn} if undefined like so:

Code: Select all

{ any{ original }{ fn } }