Linux ScreenAudio: Remove Duplicates
This commit is contained in:
		
							parent
							
								
									10b38e5b41
								
							
						
					
					
						commit
						7f6db5eeda
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -37,10 +37,13 @@ function obtainVenmic() { | ||||||
| 
 | 
 | ||||||
| ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => { | ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => { | ||||||
|     const audioPid = getRendererAudioServicePid(); |     const audioPid = getRendererAudioServicePid(); | ||||||
|     return obtainVenmic() |     const list = obtainVenmic() | ||||||
|         ?.list() |         ?.list() | ||||||
|         .filter(s => s["application.process.id"] !== audioPid) |         .filter(s => s["application.process.id"] !== audioPid) | ||||||
|         .map(s => s["application.name"]); |         .map(s => s["application.name"]); | ||||||
|  | 
 | ||||||
|  |     // Remove duplicates
 | ||||||
|  |     return list && [...new Set(list)]; | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| ipcMain.handle( | ipcMain.handle( | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Vendicated
						Vendicated