From d2c7f3d44cb791a7db9ed9a11b0fa30d1eee5f0e Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 22 Dec 2021 11:50:49 +0100 Subject: Added integration test, updated diagram --- solo_tool.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'solo_tool.py') diff --git a/solo_tool.py b/solo_tool.py index 53670fb..538d558 100644 --- a/solo_tool.py +++ b/solo_tool.py @@ -1,3 +1,5 @@ +import os + from playlist import Playlist from abcontroller import ABController from session_manager import SessionManager @@ -22,7 +24,8 @@ class SoloTool: self._abController.positionChanged(position) def addSong(self, path): - self._sessionManager.addSong(path) + if os.path.isfile(path): + self._sessionManager.addSong(path) def setSong(self, index): self._playlist.setCurrentSong(index) @@ -44,7 +47,6 @@ class SoloTool: with open(path, "w") as f: self._sessionManager.saveSession(f) - # Playback control def play(self): self._player.play() -- cgit v1.2.3