aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/src/solo_tool/solo_tool_controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo-tool-project/src/solo_tool/solo_tool_controller.py')
-rw-r--r--solo-tool-project/src/solo_tool/solo_tool_controller.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/solo-tool-project/src/solo_tool/solo_tool_controller.py b/solo-tool-project/src/solo_tool/solo_tool_controller.py
new file mode 100644
index 0000000..d283725
--- /dev/null
+++ b/solo-tool-project/src/solo_tool/solo_tool_controller.py
@@ -0,0 +1,22 @@
+import os
+
+from solo_tool.solo_tool import SoloTool
+
+class SoloToolController:
+ def __init__(self, soloTool: SoloTool):
+ self._soloTool = soloTool
+
+ def nextSong(self):
+ current = self._soloTool.getCurrentSong()
+ if current is None:
+ self._soloTool.setSong(0)
+ else:
+ self._soloTool.setSong(current + 1)
+
+ def previousSong(self):
+ current = self._soloTool.getCurrentSong()
+ if current is None:
+ self._soloTool.setSong(0)
+ else:
+ self._soloTool.setSong(current - 1)
+