From 2b4323eca801638f0a305ff29afe815a45e103b1 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 4 Jan 2022 17:55:00 +0100 Subject: Added current value to notification system, fixed Qt hack --- notifier.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'notifier.py') 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()) -- cgit v1.2.3