diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index eced5db..1207d87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -185,8 +185,12 @@ impl Application { } } Some("play") => { + let playlist = self.playlist.lock().expect("Mutex was not poisoned"); + if !self.player.is_started() { - self.player.stop_current(); + if !playlist.is_empty() { + self.player.stop_current(); + } } else { self.player.play()?; } |
