Skip to content

Commit

Permalink
Disable MPRIS by the default.
Browse files Browse the repository at this point in the history
Resolves #236.
  • Loading branch information
SpacingBat3 committed Sep 11, 2022
1 parent 0e77e9a commit 4e1716c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sources/code/common/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,21 @@ let overwriteMain: (() => unknown) | undefined;

for(const flag of getRedommendedOSFlags())
applyFlags(flag[0], flag[1]);

// Workaround #236: WebCord calls appear as players in playerctl
if(process.platform !== "win32" && process.platform !== "darwin") {
const enabledFeatures = app.commandLine.getSwitchValue("enable-features");
["MediaSessionService","HardwareMediaKeyHandling"].forEach((feature) => {
if(!enabledFeatures.includes(feature)) {
const disabledFeatures = app.commandLine.getSwitchValue("disable-features");
if(disabledFeatures === "") {
app.commandLine.appendSwitch("disable-features",enabledFeatures);
} else {
app.commandLine.appendSwitch("disable-features",disabledFeatures+","+feature);
}
}
});
}
}

// Set global user agent
Expand Down

0 comments on commit 4e1716c

Please sign in to comment.