Browse Source

fzmp: fix missing key name error

DanielFGray 7 months ago
parent
commit
b465808820
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      fzmp

+ 5
- 5
fzmp View File

@@ -209,10 +209,10 @@ filter_by_songs() {
209 209
 filter_by_genres() {
210 210
   local choice
211 211
   mapfile -t choice < <(mpc search -f '%genre%' genre '' |
212
-    awk 'NF' | sort | uniq -ic | sort -rn |
212
+    awk 'NF' | sort | uniq -c | sort -rn |
213 213
     fzf --prompt='genres > ' \
214 214
       --preview='mpc search -f "%artist%" genre {2..} | sort -u' \
215
-      --bind="$findadd_key:execute-silent:mpc findadd genre {2..}" \
215
+      --bind="${bindings[findadd]}:execute-silent:mpc findadd genre {2..}" \
216 216
       --expect="${key_bindings},enter" |
217 217
     sed -r 's/^\s*[0-9]+\s*//')
218 218
   (( ${#choice[@]} > 0 )) || die
@@ -230,7 +230,7 @@ filter_by_artist_from_genre() {
230 230
     fzf --prompt="$genre > " \
231 231
       --preview="$album_listing" \
232 232
       --expect="${key_bindings},enter" \
233
-      --bind="$findadd_key:execute-silent:mpc findadd artist {}")
233
+      --bind="${bindings[findadd]}:execute-silent:mpc findadd artist {}")
234 234
   (( ${#choice[@]} > 0 )) || filter_by_genres
235 235
   case "${choice[0]}" in
236 236
     enter) filter_by_album_from_artist "${choice[1]}" ;;
@@ -243,7 +243,7 @@ filter_by_artists() {
243 243
   mapfile -t choice < <(mpc list artist |
244 244
     fzf --prompt='artists > ' \
245 245
       --preview="$album_listing" \
246
-      --bind="$findadd_key:execute-silent:mpc findadd artist {}" \
246
+      --bind="${bindings[findadd]}:execute-silent:mpc findadd artist {}" \
247 247
       --expect="${key_bindings},enter")
248 248
   (( ${#choice[@]} > 0 )) || die
249 249
   case "${choice[0]}" in
@@ -261,7 +261,7 @@ filter_by_album_from_artist() {
261 261
     fzf --prompt="$artist > " \
262 262
       --preview="mpc search -f '[[[%track% - ][%title%]]|%file%]' artist '$artist' album {2}" \
263 263
       --expect="${key_bindings},enter" \
264
-      --bind="$findadd_key:execute-silent:mpc findadd album {2..}" \
264
+      --bind="${bindings[findadd]}:execute-silent:mpc findadd album {2..}" \
265 265
       --delimiter='\t' |
266 266
       cut -f2)
267 267
   case "${choice[0]}" in

Loading…
Cancel
Save