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)