Update public source

This commit is contained in:
2026-10-11 09:14:06 +03:00
parent 18837b2a08
commit 6832b085ca
3 changed files with 40 additions and 3 deletions
+11 -1
View File
@@ -496,7 +496,17 @@ def session_card(
<tr> <tr>
<td><b>Imported</b></td> <tr>
<td><b>Session origin</b></td>
<td>{session.get("origin", "Unknown")}</td>
</tr>
<tr>
<td><b>Capture started</b></td>
<td>{format_datetime(session.get("start_time"))}</td> <td>{format_datetime(session.get("start_time"))}</td>
+8 -2
View File
@@ -2639,9 +2639,15 @@ Duration:
<br> <br>
Database imported: Session origin:
{esc(format_datetime(session["start_time"]))} {esc(session.get("origin", "Unknown"))}
<br>
Capture started:
{esc(format_report_datetime(session["start_time"]))}
<br> <br>
+21
View File
@@ -35,6 +35,23 @@ from .utils import (
format_size, format_size,
) )
def session_origin(capture_file):
if not capture_file:
return "Unknown"
capture_file = str(capture_file)
if (
capture_file == "imported.wifitrip"
or capture_file.startswith("wifitrip:")
):
return "Imported from .wifitrip"
if capture_file.startswith("captures/"):
return "Local capture"
return "Unknown"
# ============================================================ # ============================================================
# Список всех поездок # Список всех поездок
@@ -530,6 +547,10 @@ def session_statistics(
"capture_file": capture_file, "capture_file": capture_file,
"origin": session_origin(
capture_file
),
} }
# ============================================================ # ============================================================