Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0 (#1786)

* Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0

* Format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-12-06 12:37:19 -05:00
committed by GitHub
parent 949829ae6b
commit 83c94c044d
37 changed files with 524 additions and 143 deletions

View File

@@ -44,10 +44,18 @@ object OpdsStringUtil {
if (serverConfig.opdsUseBinaryFileSizes.value) {
// Binary notation (base 1024)
when {
size >= 1_125_899_906_842_624 -> "%.2f TiB".format(size / 1_125_899_906_842_624.0) // 1024^4
size >= 1_073_741_824 -> "%.2f GiB".format(size / 1_073_741_824.0) // 1024^3
size >= 1_048_576 -> "%.2f MiB".format(size / 1_048_576.0) // 1024^2
size >= 1024 -> "%.2f KiB".format(size / 1024.0) // 1024
// 1024^4
size >= 1_125_899_906_842_624 -> "%.2f TiB".format(size / 1_125_899_906_842_624.0)
// 1024^3
size >= 1_073_741_824 -> "%.2f GiB".format(size / 1_073_741_824.0)
// 1024^2
size >= 1_048_576 -> "%.2f MiB".format(size / 1_048_576.0)
// 1024
size >= 1024 -> "%.2f KiB".format(size / 1024.0)
else -> "$size bytes"
}
} else {