i feel like I fix this before and its strange why it suddenly appeared
authorIan Kelling <ian@iankelling.org>
Wed, 7 Oct 2026 11:13:13 +0000 (07:13 -0400)
committerIan Kelling <ian@iankelling.org>
Wed, 7 Oct 2026 11:13:13 +0000 (07:13 -0400)
beetag
brc2

diff --git a/beetag b/beetag
index 19ad1c89eb7409472508d4237efb3e366f9a5a21..9021226824744734accc06481f287d1338cafd4e 100755 (executable)
--- 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 c9ac4f1e01a9850ab6ab473c154330feea83e434..172e00681583193f5b8e71c867f873f681f4f460 100644 (file)
--- 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