blob: da1a402eb5d64f6a4b3ac96a15ae367a12c68f78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
from playlist import Playlist
from abcontroller import ABController
from session_manager import SessionManager
from player_vlc import Player
class SoloTool:
def __init__(self, player=None):
self._player = Player() if player is None else player
self._playlist = Playlist(self._player)
self._abController = ABController()
self._sessionManager = SessionManager(self._playlist, self._abController)
def addSong(self, path):
self._sessionManager.addSong(path)
def setSong(self, index):
self._playlist.setCurrentSong(index)
# Playback control
def play(self):
self._player.play()
def pause(self):
self._player.pause()
def stop(self):
self._player.stop()
def setPlaybackRate(self, rate):
self._player.setPlaybackRate(rate)
def setPlaybackPosition(self, position):
self._player.setPlaybackPosition(position)
def setPlaybackVolume(self, volume):
self._player.setPlaybackVolume(volume)
|