Rename the functions for size conversion

This commit is contained in:
KnugiHK
2024-09-24 23:31:00 +08:00
parent fb88c83ac4
commit 05d21e3e5a
3 changed files with 8 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ from Whatsapp_Chat_Exporter.data_model import ChatStore, Message
from Whatsapp_Chat_Exporter.utility import MAX_SIZE, ROW_SIZE, DbType, convert_time_unit, determine_metadata
from Whatsapp_Chat_Exporter.utility import rendering, Crypt, Device, get_file_name, setup_template, JidType
from Whatsapp_Chat_Exporter.utility import brute_force_offset, CRYPT14_OFFSETS, get_status_location
from Whatsapp_Chat_Exporter.utility import get_chat_condition, slugify, convert_size, chat_is_empty
from Whatsapp_Chat_Exporter.utility import get_chat_condition, slugify, bytes_to_readable, chat_is_empty
try:
import zlib
@@ -740,7 +740,7 @@ def calls(db, data, timezone_offset, filter_chat):
call.data += "unavailable."
elif content['call_result'] == 5:
call_time = convert_time_unit(content['duration'])
call_bytes = convert_size(content['bytes_transferred'])
call_bytes = bytes_to_readable(content['bytes_transferred'])
call.data += (
f"initiated and lasted for {call_time} "
f"with {call_bytes} data transferred."