backup-cloud: use $HumanReadableNum for file size

This commit is contained in:
Christian Hesse 2023-11-15 11:44:38 +01:00
parent 890cd6c58d
commit 180d6b8733

View file

@ -18,6 +18,7 @@
:global DeviceInfo; :global DeviceInfo;
:global FormatLine; :global FormatLine;
:global HumanReadableNum;
:global LogPrintExit2; :global LogPrintExit2;
:global RandomDelay; :global RandomDelay;
:global ScriptFromTerminal; :global ScriptFromTerminal;
@ -51,7 +52,7 @@ $WaitFullyConnected;
message=("Uploaded backup for " . $Identity . " to cloud.\n\n" . \ message=("Uploaded backup for " . $Identity . " to cloud.\n\n" . \
[ $DeviceInfo ] . "\n\n" . \ [ $DeviceInfo ] . "\n\n" . \
[ $FormatLine "Name" ($Cloud->"name") ] . "\n" . \ [ $FormatLine "Name" ($Cloud->"name") ] . "\n" . \
[ $FormatLine "Size" ($Cloud->"size" . " B (" . ($Cloud->"size" / 1024) . " KiB)") ] . "\n" . \ [ $FormatLine "Size" ([ $HumanReadableNum ($Cloud->"size") 1024 ] . "iB") ] . "\n" . \
[ $FormatLine "Download key" ($Cloud->"secret-download-key") ]); silent=true }); [ $FormatLine "Download key" ($Cloud->"secret-download-key") ]); silent=true });
} on-error={ } on-error={
$SendNotification2 ({ origin=$0; \ $SendNotification2 ({ origin=$0; \