th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.98k stars 510 forks source link

[Bug]: Precise volume does not remember the volume set by the volume slider #1601

Open Kenivia opened 10 months ago

Kenivia commented 10 months ago

Preflight Checklist

YouTube Music (Application) Version

3.2.2.0

Are you using the portable version of the YouTube Music Application?

What operating system are you using?

Windows

Operating System Version

Windows 11

What arch are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Reproduction steps

  1. Enable Precise volume
  2. Use arrow keys to change the volume to 70%
  3. Use the mouse to change the volume to 30% via the slider
  4. Restart the app

Expected Behavior

Player remembers the most recent volume(30%)

Actual Behavior

Volume is set back to 70%

Enabled plugins

  1. Precise volume

Additional Information

No response

Kenivia commented 10 months ago

I had a look in config.json and found that "savedVolume" was set to 93. I deleted the variable and the issue went away, but I've never touched the config file before so I'm not sure why it would be set like this.

Kenivia commented 10 months ago

After digging around the source code & testing it appears that the plugin will update "savedVolume" in the config file(or add it in if it was deleted before) when using the arrow keys but not when using the mouse to manually change the volume slider. I'm guessing something is wrong with the setupSlideObserver function. I have updated the reproduction steps to match this.