-
Notifications
You must be signed in to change notification settings - Fork 164
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
SafeEyes gets stuck because of the mediacontrol plugin sometimes #459
Comments
Hi, I am working on Safe Eyes 3 (though the development is paused for a while due to my busy schedule). I will include the fix in the new version. |
btw did you modify the media control plugin to work with playerctl? If so, would you mind sharing the advantages of using playerctl? If it is universally applicable for all Linux distributions and better than the current approach, I can integrate it with the media control plugin by default. |
No. I should have said that it's the issue with
I'm using commands like |
Got it thank you for the details. The media control plugin is using DBus API to command the system to control the current player. I will fix the issue in the next release. |
@di72nn Is this issue present with the latest version (2.2.2)? |
I haven't been monitoring it closely lately, but I'll try to check. It may be slightly related that I caught this today: Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/safeeyes/utility.py", line 106, in <lambda>
GLib.idle_add(lambda: target_function(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/safeeyes/core.py", line 277, in __fire_start_break
self.start_break.fire(break_obj)
File "/usr/lib/python3.12/site-packages/safeeyes/model.py", line 293, in fire
if not handler(*args, **keywargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/safeeyes/safeeyes.py", line 356, in start_break
actions = self.plugins_manager.get_break_screen_tray_actions(break_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/safeeyes/plugin_manager.py", line 209, in get_break_screen_tray_actions
action = plugin['module'].get_tray_action(break_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/safeeyes/plugins/mediacontrol/plugin.py", line 89, in get_tray_action
players = __active_players()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/safeeyes/plugins/mediacontrol/plugin.py", line 62, in __active_players
status = player.get_cached_property('PlaybackStatus').unpack().lower()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'unpack' |
I use playerctl to control media players, and in some situations this happen:
This results in the break screen not appearing and the next break time stuck in the past.
I think I also had
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.DBus.Properties” on object at path /org/mpris/MediaPlayer2
(with the same stacktrace), so it's not exclusive toplayerctl
.Expected behavior
Desktop:
Thanks for working on SafeEyes!
The text was updated successfully, but these errors were encountered: