aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/src/solo_tool/solo_tool_controller.py
blob: 052957064d954efe3504b693a22d16ee6440bc60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.song
        if current is None:
            self._soloTool.song = 0
        else: 
            self._soloTool.song = current + 1

    def previousSong(self):
        current = self._soloTool.song
        if current is None:
            self._soloTool.song = 0
        else: 
            self._soloTool.song = current - 1