From 80cf3eaa39593edfc24963474ac92377adf4d1b6 Mon Sep 17 00:00:00 2001 From: Gronod Date: Wed, 20 May 2026 00:00:17 +0100 Subject: [PATCH] Fix filtering to use both client type and instanceId for unique identification --- public/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/app.js b/public/app.js index b7d2dc0..153ef0b 100644 --- a/public/app.js +++ b/public/app.js @@ -386,9 +386,11 @@ function renderDownloads() { // Filter downloads by selected clients let filteredDownloads = downloads; if (selectedDownloadClients.length > 0) { - // Map indices to instanceIds - const selectedInstanceIds = selectedDownloadClients.map(idx => downloadClients[idx]?.id).filter(Boolean); - filteredDownloads = downloads.filter(d => selectedInstanceIds.includes(d.instanceId)); + // Map indices to client objects, then filter by both client type and instanceId + const selectedClients = selectedDownloadClients.map(idx => downloadClients[idx]).filter(Boolean); + filteredDownloads = downloads.filter(d => + selectedClients.some(c => c.type === d.client && c.id === d.instanceId) + ); } // Sort downloads by client order (matching the order in downloadClients)