use app name instead of node name
This commit is contained in:
parent
2c9cf82305
commit
943232387d
2 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ await Promise.all([
|
||||||
copyFile(
|
copyFile(
|
||||||
"./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-x64/node-napi-v7.node",
|
"./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-x64/node-napi-v7.node",
|
||||||
"./static/dist/venmic.node"
|
"./static/dist/venmic.node"
|
||||||
).catch(() => {}),
|
).catch(() => console.warn("Failed to copy venmic. Building without venmic support")),
|
||||||
createContext({
|
createContext({
|
||||||
...NodeCommonOpts,
|
...NodeCommonOpts,
|
||||||
entryPoints: ["src/main/index.ts"],
|
entryPoints: ["src/main/index.ts"],
|
||||||
|
|
|
@ -38,16 +38,16 @@ function obtainVenmic() {
|
||||||
ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => {
|
ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => {
|
||||||
const audioPid = getRendererAudioServicePid();
|
const audioPid = getRendererAudioServicePid();
|
||||||
return obtainVenmic()
|
return obtainVenmic()
|
||||||
?.list(["node.name", "application.process.id", "application.name"])
|
?.list(["application.process.id", "application.name"])
|
||||||
.filter(s => s["application.process.id"] !== audioPid)
|
.filter(s => s["application.process.id"] !== audioPid)
|
||||||
.map(s => s["node.name"]);
|
.map(s => s["application.name"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle(
|
ipcMain.handle(
|
||||||
IpcEvents.VIRT_MIC_START,
|
IpcEvents.VIRT_MIC_START,
|
||||||
(_, target: string) =>
|
(_, target: string) =>
|
||||||
obtainVenmic()?.link({
|
obtainVenmic()?.link({
|
||||||
key: "node.name",
|
key: "application.name",
|
||||||
value: target,
|
value: target,
|
||||||
mode: "include"
|
mode: "include"
|
||||||
})
|
})
|
||||||
|
|
Reference in a new issue