X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=fa84ca383c4ddbcfe90340caa4f8e10950b0412f;hb=9a1c9e1c16555a4158cfd4044a615d89ab877abc;hp=c65e578a09afdc9bc00c7c6e4e52315b9f04544a;hpb=89fc59d6e4bbeb1778c6aaaee776122dcf790871;p=distro-setup diff --git a/brc2 b/brc2 index c65e578..fa84ca3 100644 --- a/brc2 +++ b/brc2 @@ -349,7 +349,7 @@ alerts() { ralerts() { # remote alerts local ret shell # this list is duplicated in check-remote-mailqs - for h in bk je li frodo kwwg x3wg x2wg kdwg sywg; do + for h in bk je li frodo x3wg kdwg sywg; do echo $h: shell="ssh $h" if [[ $HOSTNAME == "${h%wg}" ]]; then @@ -664,7 +664,7 @@ beetag() { local do_rare_genres read_wait help line lsout tmp ls_line skip_lookback local escape_char escaped_input expected_input skip_input_regex right_pad erasable_line seek_sec local pl_state_path pl_state_dir pl_state_file - local new_random pl_seed_path seed_num seed_file + local new_random pl_seed_path seed_num seed_file fmt local -a pl_tags buttons button_map ids tags tmp_tags initial_ls ls_lines paths local -A button_i local -i i j volume scrolled id_count line_int skip_start pre_j_count head_count skip_lookback @@ -741,8 +741,9 @@ beetag() { # PijokVipiotOzeph is just a random string for a delimiter + fmt='%ifdef{rating,$rating }'"$fstring"'$genre | $title - $artist - $album $length $id PijokVipiotOzeph $path' # shellcheck disable=SC2016 # obvious reason - mapfile -t initial_ls < <(beet ls -f '%ifdef{rating,$rating }'"$fstring"'$genre | $title - $artist - $album $length $id PijokVipiotOzeph $path' "$@" | { if $random; then sort -R --random-source=$pl_seed_path; else cat; fi; } ) + mapfile -t initial_ls < <(beet ls -f "$fmt" "$@" | { if $random; then sort -R --random-source=$pl_seed_path; else cat; fi; } ) id_count=${#initial_ls[@]} for line in "${initial_ls[@]}"; do path="${line#*PijokVipiotOzeph }" @@ -838,13 +839,10 @@ beetag() { fi beetag-help if [[ $char == $'\n' ]]; then - # https://stackoverflow.com/a/5722874 - kill-bg-quiet break fi case $char in ";") - kill-bg-quiet j=$(( j - 2 )) break ;; @@ -854,7 +852,6 @@ beetag() { doplay=false else doplay=true - kill-bg-quiet mpvrpc '{ "command": ["loadfile", "'"$path"'"] }' erasable_line=false fi @@ -862,7 +859,6 @@ beetag() { continue ;; _) - kill-bg-quiet m beet rm --delete --force "id:$id" beetag-nostatus 4 # guessing. dont want to test atm break @@ -1024,7 +1020,6 @@ beetag() { j=$(( j - 1 )) fi fi - kill-bg-quiet break fi ;;