Skip to content

feat: default volume configuration#114

Merged
MattiaPun merged 2 commits into
MattiaPun:mainfrom
aaron-r-campbell:feat/default_volume
Apr 20, 2026
Merged

feat: default volume configuration#114
MattiaPun merged 2 commits into
MattiaPun:mainfrom
aaron-r-campbell:feat/default_volume

Conversation

@aaron-r-campbell
Copy link
Copy Markdown
Contributor

Added default_volume option to App section of config. Addresses #109

Configuration Details

  • default_volume = -1 (default): The player controls initial volume (current behavior). In my case mpv is persisting my previous session volume somehow, which I prefer over a set default.
  • default_volume = 0-100: Sets a specific default volume on startup.
  • default_volume > 100 or < 0 (except -1): Values are automatically clamped to the 0-100 range.

Volume Adjustment Behavior

  1. Adjustments now snap to the nearest multiple of volumeStep if not already aligned (e.g., 43 goes up to 45, down to 40)
  2. If already a multiple, behaves as before

Additional Notes

I noticed some redundancy between for example mpvClient.CurrentVolume and player.GetVolume, which could be considered in a future refactor / code cleanup.

@MattiaPun MattiaPun merged commit 327cf25 into MattiaPun:main Apr 20, 2026
1 check passed
@MattiaPun
Copy link
Copy Markdown
Owner

Hi Aaron, thank you for this PR. It will be available in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants