Page 1 of 1

[gigabytes] tag now adds a space and "GB"

Posted: 09 Sep 2021, 18:25
by dolausen
In the Microsoft Store version (4.9.4.0), the [gigabytes] tag now appends a space and capital GB to the value.

Previously I had been using the [gigabytes]GB so that something that was 5GB would display as 5.0GB. Now with the modification, there is no way to remove the space. This is creating inconsistencies with THOUSANDS of files. Someone can create the 5.0 GB by simply using the old method of [gigabytes] GB, but there now appears no way to remove the space.

Re: [gigabytes] tag now adds a space and "GB"

Posted: 10 Sep 2021, 03:02
by rednoah
FileBot 4.9.4 uses the new FileSize type, instead of String (older versions; formatted number with unit) or BigDecimal (recent versions; number only), for all file size bindings to simplify the more typical use cases.


:idea: If you want to use String methods, you may need to call toString() first:

Code: Select all

{ gigabytes.toString().replace(' ', '') }
:idea: You can get the numeric value like so:

Code: Select all

{ gigabytes.toFloat() }
:idea: You can get the rounded numeric value like so:

Code: Select all

{ gigabytes.round(1) }
:idea: You can generate the String value you want like so:

Code: Select all

{ gigabytes.round(1) }GB