From eb9ce5164f58c18e567c4f586c0bf254226a232c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Fri, 5 Sep 2025 10:55:13 +0200 Subject: [PATCH] Fix keys --- src/sh/filter.sh | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/sh/filter.sh b/src/sh/filter.sh index 8830741..5e2f8a9 100644 --- a/src/sh/filter.sh +++ b/src/sh/filter.sh @@ -7,10 +7,10 @@ # # The keybinding KEYS_FILTER_LOCAL triggers a filter of QUERY_LOCAL in the # views VIEW_ARTIST, VIEW_RELEASEGROUP, and VIEW_RELEASE only. Here, it is only -# possible to adjust QUERY_LOCAL via the configuration. For all other keys, the -# filters are individually configurable, by specifying e.g., -# F_3_VIEW_LIST_ALBUMS. -# +# possible to adjust QUERY_LOCAL via the configuration. The keybinding KEYS_FILTER_0 +# resets the query. F_1_.. filters are the default filters when the respective +# view is entered. For all other keys, the filters are individually +# configurable, by specifying e.g., F_3_VIEW_LIST_ALBUMS. # # Derived queries # To derive the queries from the theme, we must perform some steps: 1) remove @@ -47,7 +47,6 @@ F_6_VIEW_ARTIST="${F_6_VIEW_ARTIST:-}" F_7_VIEW_ARTIST="${F_7_VIEW_ARTIST:-}" F_8_VIEW_ARTIST="${F_8_VIEW_ARTIST:-}" F_9_VIEW_ARTIST="${F_9_VIEW_ARTIST:-}" -F_0_VIEW_ARTIST="${F_0_VIEW_ARTIST:-}" F_1_VIEW_RELEASEGROUP="${F_1_VIEW_RELEASEGROUP:-"${q_official:-}"}" F_2_VIEW_RELEASEGROUP="${F_2_VIEW_RELEASEGROUP:-}" @@ -58,7 +57,6 @@ F_6_VIEW_RELEASEGROUP="${F_6_VIEW_RELEASEGROUP:-}" F_7_VIEW_RELEASEGROUP="${F_7_VIEW_RELEASEGROUP:-}" F_8_VIEW_RELEASEGROUP="${F_8_VIEW_RELEASEGROUP:-}" F_9_VIEW_RELEASEGROUP="${F_9_VIEW_RELEASEGROUP:-}" -F_0_VIEW_RELEASEGROUP="${F_0_VIEW_RELEASEGROUP:-}" F_1_VIEW_RELEASE="${F_1_VIEW_RELEASE:-}" F_2_VIEW_RELEASE="${F_2_VIEW_RELEASE:-}" @@ -69,7 +67,6 @@ F_6_VIEW_RELEASE="${F_6_VIEW_RELEASE:-}" F_7_VIEW_RELEASE="${F_7_VIEW_RELEASE:-}" F_8_VIEW_RELEASE="${F_8_VIEW_RELEASE:-}" F_9_VIEW_RELEASE="${F_9_VIEW_RELEASE:-}" -F_0_VIEW_RELEASE="${F_0_VIEW_RELEASE:-}" F_1_LIST_ARTISTS="${F_1_LIST_ARTISTS:-}" F_2_LIST_ARTISTS="${F_2_LIST_ARTISTS:-}" @@ -80,7 +77,6 @@ F_6_LIST_ARTISTS="${F_6_LIST_ARTISTS:-}" F_7_LIST_ARTISTS="${F_7_LIST_ARTISTS:-}" F_8_LIST_ARTISTS="${F_8_LIST_ARTISTS:-}" F_9_LIST_ARTISTS="${F_9_LIST_ARTISTS:-}" -F_0_LIST_ARTISTS="${F_0_LIST_ARTISTS:-}" F_1_LIST_ALBUMS="${F_1_LIST_ALBUMS:-}" F_2_LIST_ALBUMS="${F_2_LIST_ALBUMS:-}" @@ -91,7 +87,6 @@ F_6_LIST_ALBUMS="${F_6_LIST_ALBUMS:-}" F_7_LIST_ALBUMS="${F_7_LIST_ALBUMS:-}" F_8_LIST_ALBUMS="${F_8_LIST_ALBUMS:-}" F_9_LIST_ALBUMS="${F_9_LIST_ALBUMS:-}" -F_0_LIST_ALBUMS="${F_0_LIST_ALBUMS:-}" # Determine preset query # @argument $1: Current view @@ -208,15 +203,12 @@ default_query() { esac ;; esac - case ",$KEYS_FILTER_0," in - *",$key,"*) - case "$view" in - "$VIEW_ARTIST") echo "$F_0_VIEW_ARTIST" ;; - "$VIEW_RELEASEGROUP") echo "$F_0_VIEW_RELEASEGROUP" ;; - "$VIEW_RELEASE") echo "$F_0_VIEW_RELEASE" ;; - "$VIEW_LIST_ARTISTS") echo "$F_0_LIST_ARTISTS" ;; - "$VIEW_LIST_ALBUMS") echo "$F_0_LIST_ALBUMS" ;; - esac - ;; - esac + # Doing nothing is the same as this last block: + # case ",$KEYS_FILTER_0," in + # *",$key,"*) + # case "$view" in + # "$VIEW_ARTIST" | "$VIEW_RELEASEGROUP" | "$VIEW_RELEASE" | "$VIEW_LIST_ARTISTS" | "$VIEW_LIST_ALBUMS") echo "" ;; + # esac + # ;; + # esac }