Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow any value to set MPRIS volume #1343

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

ThomasFrans
Copy link
Contributor

This fixes a small inconsistency between the MPRIS implementation and the specification. The specification allows any number when setting the volume, which have to be clamped to the effectively allowed range in the application.
https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Volume

Describe your changes

  • Instead of only changing the number if it is in the range 0.0..0.1, always set it after clamping it to that range.

Issue ticket number and link

/

Checklist before requesting a review

  • Documentation was updated (i.e. due to changes in keybindings, commands, etc.)
  • Changelog was updated with relevant user-facing changes (eg. not dependency updates,
    not performance improvements, etc.)

This fixes a small inconsistency between the MPRIS implementation and
the specification. The specification allows any number when setting the
volume, which have to be clamped to the effectively allowed range in the
application.
https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Volume
@ThomasFrans
Copy link
Contributor Author

ThomasFrans commented Nov 29, 2023

Found this while looking for a solution for #1328.

Tested it with busctl.

@hrkfdn hrkfdn merged commit 7a9c8f3 into hrkfdn:main Dec 1, 2023
5 checks passed
@hrkfdn
Copy link
Owner

hrkfdn commented Dec 1, 2023

Thanks, looks reasonable!

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