aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo_tool.py')
-rw-r--r--solo_tool.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/solo_tool.py b/solo_tool.py
index db28c45..c32d3e8 100644
--- a/solo_tool.py
+++ b/solo_tool.py
@@ -42,16 +42,21 @@ class SoloTool:
def setAbLimits(self, aLimit, bLimit):
self._abController.setLimits(aLimit, bLimit)
- def getAbLimits(self):
+ def getStoredAbLimits(self):
currentSong = self._playlist.getCurrentSong()
if currentSong is not None:
- return self._abController.getLimits(currentSong)
+ return self._abController.getStoredLimits(currentSong)
else:
return list()
def setAbLimitEnable(self, enable):
self._abController.setEnable(enable)
+ def jumpToA(self):
+ a = self._abController.getCurrentLimits()[0]
+ # XXX assumes that player.setPlaybackPosition is thread-safe!
+ self._player.setPlaybackPosition(a)
+
def loadSession(self, path):
with open(path, "r") as f:
self._sessionManager.loadSession(f)
@@ -69,6 +74,9 @@ class SoloTool:
def stop(self):
self._player.stop()
+ def isPlaying(self):
+ return self._player.isPlaying()
+
def setPlaybackRate(self, rate):
self._player.setPlaybackRate(rate)