5.0.0 Binding "original": undefined

All your suggestions, requests and ideas for future development
Post Reply
sentience
Posts: 6
Joined: 18 Jun 2020, 03:00

5.0.0 Binding "original": undefined

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

Re: 5.0.0 Binding "original": undefined

Post 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?
:idea: Please read the FAQ and How to Request Help.
sentience
Posts: 6
Joined: 18 Jun 2020, 03:00

Re: 5.0.0 Binding "original": undefined

Post by sentience »

Weird. {original} worked prior to 5.0.0 on previously-unrenamed files.

I'll give {fn} a try!
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 5.0.0 Binding "original": undefined

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