From dbfb164049279c743db6b813e0ed443510c9d88a Mon Sep 17 00:00:00 2001 From: Basxto Date: Wed, 24 Jul 2024 07:51:13 +0200 Subject: [PATCH] [fix] Switch values of binary and decimal prefixes --- searx/utils.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/searx/utils.py b/searx/utils.py index 0c11ccc65..a4109af6b 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -45,13 +45,15 @@ _JS_VOID_RE = re.compile(r'void\s+[0-9]+|void\s*\([0-9]+\)') _JS_DECIMAL_RE = re.compile(r":\s*\.") _STORAGE_UNIT_VALUE: Dict[str, int] = { - 'TB': 1024 * 1024 * 1024 * 1024, - 'GB': 1024 * 1024 * 1024, - 'MB': 1024 * 1024, - 'TiB': 1000 * 1000 * 1000 * 1000, - 'GiB': 1000 * 1000 * 1000, - 'MiB': 1000 * 1000, - 'KiB': 1000, + 'TB': 1000 * 1000 * 1000 * 1000, + 'GB': 1000 * 1000 * 1000, + 'MB': 1000 * 1000, + 'kB': 1000, + 'TiB': 1024 * 1024 * 1024 * 1024, + 'GiB': 1024 * 1024 * 1024, + 'MiB': 1024 * 1024, + 'KiB': 1024, + 'KB': 1024, } _XPATH_CACHE: Dict[str, XPath] = {}