diff --git a/backend/app.py b/backend/app.py index 2774c8f..10ccb5c 100644 --- a/backend/app.py +++ b/backend/app.py @@ -164,6 +164,10 @@ def list_sessions(): has_disks = True if not session_files: continue + archives = {".7z", ".zip", ".rar", ".tar.gz", ".tgz", ".tar", ".gz", ".bz2", ".xz", ".ova"} + has_source = has_disks or any(f["name"].lower().endswith(tuple(archives)) for f in session_files) + if not has_source: + continue sessions.append({ "session_id": entry.name, "files": session_files[:10], diff --git a/frontend/templates/index.html b/frontend/templates/index.html index 3e1369b..c35623f 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -76,11 +76,12 @@ async function loadSessions() { for (var i = 0; i < sessions.length; i++) { var s = sessions[i]; var fileNames = s.files.map(function(f) { return f.name; }).join(', '); + var firstFile = s.files[0].name; html += '
'; html += '
' + s.session_id.substring(0, 8) + ' — ' + fileNames + ' (' + s.total_size_gb + ' GiB)'; if (s.has_disks) html += ' extracted'; html += '
'; - html += ''; + html += ''; html += '
'; } list.innerHTML = html;