removed unnecessary if and used better Repeat change detection

This commit is contained in:
David Metzler
2023-01-28 20:36:31 +01:00
parent 317e3af412
commit 8bf2c8397e
2 changed files with 5 additions and 42 deletions

View File

@ -89,10 +89,9 @@ function registerMPRIS(win) {
});
ipcMain.on('volumeChanged', (_, value) => {
if (config.plugins.isEnabled('precise-volume')) {
player.volume = value / 100;
}
player.volume = value / 100;
});
player.on('volume', (newVolume) => {
if (config.plugins.isEnabled('precise-volume')) {
// With precise volume we can set the volume to the exact value.