aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/handler.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/handler.rs b/src/handler.rs
index c9d4d04..c9df412 100755
--- a/src/handler.rs
+++ b/src/handler.rs
@@ -275,12 +275,16 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
// Play next song
KeyCode::Char('>') => {
- app.conn.conn.next()?;
+ if !app.queue_list.list.is_empty() {
+ app.conn.conn.next()?;
+ }
}
// Play previous song
KeyCode::Char('<') => {
- app.conn.conn.prev()?;
+ if !app.queue_list.list.is_empty() {
+ app.conn.conn.prev()?;
+ }
}
// Volume controls