From 10e168ee0e26e9368a0d5a6239075409b9d0f081 Mon Sep 17 00:00:00 2001 From: Erica Date: Tue, 23 Nov 2021 23:15:47 +0000 Subject: [PATCH] Disabled playlist keys (up/down/select) when the playlist is not visible --- bin/miniplayer | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/miniplayer b/bin/miniplayer index 6705147..946af92 100755 --- a/bin/miniplayer +++ b/bin/miniplayer @@ -711,6 +711,8 @@ class Player: anytime_keys = ["quit", "help", "select_up", "select_down", "select"] + playlist_keys = ["select_up", "select_down", "select"] + special_key_map = {curses.KEY_UP: "up", curses.KEY_DOWN: "down", curses.KEY_LEFT: "left", @@ -745,6 +747,10 @@ class Player: else: action = keybindings[keyChar] + # Check if key is a playlist key but no playlist showing + if action in playlist_keys and not self.draw_playlist: + key = self.stdscr.getch() + continue if stopped and action not in anytime_keys: key = self.stdscr.getch()