From: Ian Kelling Date: Wed, 7 Oct 2026 11:13:13 +0000 (-0400) Subject: i feel like I fix this before and its strange why it suddenly appeared X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=5d9aceebeed1e3d37bff7cdcac6eccdc8675a247;p=distro-setup i feel like I fix this before and its strange why it suddenly appeared --- diff --git a/beetag b/beetag index 19ad1c8..9021226 100755 --- a/beetag +++ b/beetag @@ -267,7 +267,7 @@ beetag-ls-setup() { # note: PijokVipiotOzeph is just a random string for a delimiter # shellcheck disable=SC2016 # false positive - fmt='%ifdef{rating,$rating }'"$tag_query"'$genres | $title - $artist - $album $length $id PijokVipiotOzeph $path' + fmt='%ifdef{rating,$rating }'"$tag_query"'$genres | $title - $artist - $album $length $id PijokVipiotOzeph /i/m/$path' for tag in "${pl_tags[@]}"; do diff --git a/brc2 b/brc2 index c9ac4f1..172e006 100644 --- a/brc2 +++ b/brc2 @@ -790,15 +790,14 @@ beetconvert-rm-extras() { local -A paths tmpf="$(mktemp)" # shellcheck disable=SC2016 # obvious reason - beet ls -f '$path' $nav_convert_query >"$tmpf" + beet ls -f '/i/converted/$path' $nav_convert_query >"$tmpf" ## begin removal of files that are leftover from previous conversion, # eg, previously rated > 1, now rated 1. while read -r l; do - convertedpath="/i/converted${l#/i/m}" - if [[ $convertedpath == *.flac ]]; then - convertedpath="${convertedpath%.flac}.mp3" + if [[ $l == *.flac ]]; then + l="${l%.flac}.mp3" fi - paths[$convertedpath]=t + paths[$l]=t done <"$tmpf" find /i/converted -path /i/converted/beetsmartplaylists -prune -o \( -type f -print \) -name '*.mp3' -o -name '*.m4a' >"$tmpf" @@ -823,7 +822,7 @@ beetsmartplaylists() { rm -rf /i/converted/beetsmartplaylists mkdir -p /i/converted/beetsmartplaylists for f in /tmp/ianbeetstmp/*; do - sed 's,^/i/m,/i/converted,;s,\.flac$,.mp3,' "$f" >"/i/converted/beetsmartplaylists/${f##*/}" + sed 's,^,/i/converted,;s,\.flac$,.mp3,' "$f" >"/i/converted/beetsmartplaylists/${f##*/}" rm "$f" done rmdir /tmp/ianbeetstmp @@ -837,16 +836,15 @@ beetrating() { ssh_prefix="ssh b8.nz" fi # shellcheck disable=SC2016 # obvious reason - beet ls -f '$rating $path' $nav_convert_query | $ssh_prefix beetrating-stdin + beet ls -f '$rating /i/converted/$path' $nav_convert_query | $ssh_prefix beetrating-stdin } # internal function for beetrating, in case we need to ssh beetrating-stdin() { - local tmp rating path cpath sqlpath userid + local tmp rating cpath sqlpath userid # plucked this from the db. im the only user. userid=23cc2eb9-e35e-4811-a0f0-d5f0dd6eb634 - while read -r rating path; do - cpath="/i/converted${path#/i/m}" # converted path + while read -r rating cpath; do if [[ $cpath == *.flac ]]; then cpath="${cpath%.*}.mp3" fi