aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo_tool.py')
-rw-r--r--solo_tool.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/solo_tool.py b/solo_tool.py
index 5e3a1fd..f52e074 100644
--- a/solo_tool.py
+++ b/solo_tool.py
@@ -12,7 +12,7 @@ class SoloTool:
self._playlist = Playlist(self._playlistCallback)
self._abController = ABController(enabled=False, callback=self._abControllerCallback)
self._sessionManager = SessionManager(self._playlist, self._abController)
- self._notifier = Notifier()
+ self._notifier = Notifier(self._player)
def _playlistCallback(self, path):
self._player.setCurrentSong(path)
@@ -80,19 +80,13 @@ class SoloTool:
self._sessionManager.saveSession(f)
def play(self):
- self._playerCommand(self._player.play)
+ self._player.play()
def pause(self):
- self._playerCommand(self._player.pause)
+ self._player.pause()
def stop(self):
- self._playerCommand(self._player.stop)
-
- def _playerCommand(self, f):
- playing = self.isPlaying()
- f()
- if playing != self.isPlaying():
- self._notifier.notify(Notifier.PLAYING_STATE_EVENT)
+ self._player.stop()
def isPlaying(self):
return self._player.isPlaying()