Linux ScreenAudio: Remove Duplicates

This commit is contained in:
Vendicated 2023-10-25 00:31:53 +02:00
parent 10b38e5b41
commit 7f6db5eeda
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -37,10 +37,13 @@ function obtainVenmic() {
ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => {
const audioPid = getRendererAudioServicePid();
return obtainVenmic()
const list = obtainVenmic()
?.list()
.filter(s => s["application.process.id"] !== audioPid)
.map(s => s["application.name"]);
// Remove duplicates
return list && [...new Set(list)];
});
ipcMain.handle(