diff --git a/backend/app.py b/backend/app.py
index 10ccb5c..4f11834 100644
--- a/backend/app.py
+++ b/backend/app.py
@@ -166,13 +166,12 @@ def list_sessions():
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],
"total_size_gb": round(total_bytes / (1024**3), 1),
"has_disks": has_disks,
+ "resumable": has_source,
})
except Exception:
pass
diff --git a/frontend/templates/index.html b/frontend/templates/index.html
index f964f7f..501718e 100644
--- a/frontend/templates/index.html
+++ b/frontend/templates/index.html
@@ -109,7 +109,11 @@ async function loadSessions() {
html += '
' + s.session_id.substring(0, 8) + ' — ' + fileNames + ' (' + s.total_size_gb + ' GiB)';
if (s.has_disks) html += ' extracted';
html += '
';
- html += '';
+ if (s.resumable) {
+ html += '';
+ } else {
+ html += '';
+ }
html += '';
}
list.innerHTML = html;
@@ -139,6 +143,17 @@ function resumeSession(sessionId, firstFile) {
document.getElementById('source-url').required = false;
}
+function cleanupSession(sessionId, btn) {
+ if (!confirm('Delete session ' + sessionId.substring(0, 8) + '?')) return;
+ btn.disabled = true;
+ btn.textContent = '...';
+ fetch('/session/cleanup/cleanup_' + sessionId, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ delete_staging_files: true, session_id: sessionId })
+ }).then(function() { loadSessions(); });
+}
+
function setPhase(label, pct, isSpinner) {
const el = document.getElementById('phase-label');
const fill = document.getElementById('pve-progress-bar');