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

Setting volume with library doesn't emit volume changed events #313

Open
jdholtz opened this issue Jul 27, 2023 · 2 comments
Open

Setting volume with library doesn't emit volume changed events #313

jdholtz opened this issue Jul 27, 2023 · 2 comments
Assignees
Labels

Comments

@jdholtz
Copy link

jdholtz commented Jul 27, 2023

The player I am using is cmus.

When setting the volume with either player.set_volume or player.props.volume = .., the volume gets changed correctly on the player, but the player volume property does not update to the new volume. Here are steps to reproduce it:

  1. Have a player (cmus) open
  2. Follow volume changes using playerctl volume --follow
  3. Use the following code to change the volume of the player using the Python library
from gi.repository import GLib, Playerctl
manager = Playerctl.PlayerManager()
player = Playerctl.Player.new_from_name(manager.props.player_names[0])  # Make sure cmus is the only open player
player.set_volume(0.8)  # Set to a different volume
  1. Notice how the volume changes correctly in cmus, but it does not change in player.props.volume nor are there updates from the --follow command executed in step 2

Edit: I also see very similar issues with the shuffle and loop_status properties (shuffle events don’t even work at all). This could be a problem with how cmus integrates with MPRIS.

@jdholtz
Copy link
Author

jdholtz commented Jul 27, 2023

This seems to be an issue with cmus only. It works perfectly fine with Spotify, so I will close this issue.

@jdholtz jdholtz closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2023
@jdholtz
Copy link
Author

jdholtz commented Jul 27, 2023

However, I wonder why playerctl detects volume updates when using playerctl volume 0.1 compared to not detecting volume updates when using player.set_volume(0.1). I’ll reopen this issue due to this inconsistency.

@jdholtz jdholtz reopened this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants