autocompl and details with accureate time

This commit is contained in:
Q
2023-08-20 11:47:11 +03:00
parent f5449533a5
commit 0c097e52e1
3 changed files with 7 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ from flask import current_app as app
import time
import sqlite3
import shutil
from .misc import file_size_MB, file_size_human, file_date_human
from .misc import file_size_human, file_date_human, file_time_human
def get_db():
@@ -161,12 +161,12 @@ def file_details(token, name):
else:
return {}
return {
"size": file_size_MB(s.st_size),
"size": s.st_size,
"hsize": file_size_human(s.st_size, HTML=False),
"added": file_date_human(added),
"added": file_time_human(added),
"name": name,
"url": file_full_url(token, name),
"expires": file_date_human(expires),
"expires": file_time_human(expires),
"downloaded": downloads,
"max-dl": max_dl,
}