Update public source
This commit is contained in:
@@ -35,6 +35,23 @@ from .utils import (
|
||||
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,
|
||||
|
||||
"origin": session_origin(
|
||||
capture_file
|
||||
),
|
||||
|
||||
}
|
||||
|
||||
# ============================================================
|
||||
|
||||
Reference in New Issue
Block a user