diff options
Diffstat (limited to 'solo_tool.py')
-rw-r--r-- | solo_tool.py | 6 |
1 files changed, 4 insertions, 2 deletions
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() |