aboutsummaryrefslogtreecommitdiffstats
path: root/abcontroller.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2021-12-26 23:05:46 +0100
committerEddy Pedroni <eddy@0xf7.com>2021-12-26 23:05:46 +0100
commitbf232d2f3fa94f374d82464eb66bcc7d72adc3ed (patch)
tree48daafadce6d643a7fb342178c161ecec5be53fb /abcontroller.py
parent8622638f99277b43d40b61029dc3c56164d06cae (diff)
Added temporary AB limit functionality to back end
Diffstat (limited to 'abcontroller.py')
-rw-r--r--abcontroller.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/abcontroller.py b/abcontroller.py
index b67d38a..0a10078 100644
--- a/abcontroller.py
+++ b/abcontroller.py
@@ -17,7 +17,6 @@ class ABController:
def setCurrentSong(self, path):
self._ensureSongExists(path)
self._songLimits = self._limits[path]
- #self._currentLimits = None
def storeLimits(self, aLimit, bLimit, song=None):
if song is not None:
@@ -39,10 +38,12 @@ class ABController:
if index >= 0 and index < len(self._songLimits):
self._currentLimits = self._songLimits[index]
+ def setLimits(self, aLimit, bLimit):
+ self._currentLimits = _AB(aLimit, bLimit)
+
def positionChanged(self, position):
if not self._currentLimits:
return
- print("No early return")
if position > self._currentLimits.b and self._setPositionCallback and self._enabled:
self._setPositionCallback(self._currentLimits.a)