diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-01-04 17:55:00 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-01-04 17:55:00 +0100 |
commit | 2b4323eca801638f0a305ff29afe815a45e103b1 (patch) | |
tree | d130038b86d671d78eb52e56ce8d2b9b3bd16842 /notifier.py | |
parent | c4cb9a96342568890dcf1e36d02d6180bdb26ac8 (diff) |
Added current value to notification system, fixed Qt hack
Diffstat (limited to 'notifier.py')
-rw-r--r-- | notifier.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/notifier.py b/notifier.py index fc91e8c..06b4434 100644 --- a/notifier.py +++ b/notifier.py @@ -17,13 +17,13 @@ class Notifier: self._callbacks[event] = list() self._callbacks[event].append(callback) - def notify(self, event): + def notify(self, event, value): for callback in self._callbacks.get(event, list()): - callback() + callback(value) def _playingStateChangedCallback(self, *args): - self.notify(Notifier.PLAYING_STATE_EVENT) + self.notify(Notifier.PLAYING_STATE_EVENT, self._player.isPlaying()) def _playbackVolumeChangedCallback(self, *args): - self.notify(Notifier.PLAYBACK_VOLUME_EVENT) + self.notify(Notifier.PLAYBACK_VOLUME_EVENT, self._player.getPlaybackVolume()) |