From 558f145c6daeab9a107b7d9a387e0e4d22dd5b87 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sat, 2 Apr 2022 17:19:37 +0300 Subject: [PATCH] rewriten: delete make temp file, now make on the fly podcast channel uuid --- funkwhale-cli.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/funkwhale-cli.sh b/funkwhale-cli.sh index 0b30da7..7526af9 100755 --- a/funkwhale-cli.sh +++ b/funkwhale-cli.sh @@ -38,13 +38,14 @@ funkwhale_get_podcasts_artists() echo "$count_artists avalaible" artist_channels=$(jj -l -i preload 'results.#.channel.uuid' | sed 's/"//g') podcast_names=$(jj -l -i preload results.#.name | sed 's/\./_/g' | sed 's/"//g') - temp_artists=$(mktemp) + temp_artists="{}" for i in $artist_channels; do - jj -i $temp_artists -v "$i" -o $temp_artists "$(jj -i preload results.$counter.name | sed 's/\./_/g' | sed 's/\"//g')" + name_uuid=$(echo $temp_artists | jj -v "$i" "$(jj -i preload results.$counter.name | sed 's/\./_/g' | sed 's/\"//g')") + temp_artists="${name_uuid}" counter=$(expr $counter + 1) done menu_podcast_choice=$(echo "$podcast_names" | fzy) - channel_uuid=$(jj -i $temp_artists "$menu_podcast_choice") + channel_uuid=$(echo $temp_artists | jj "$menu_podcast_choice") if [ -z $channel_uuid ]; then echo 'Error when loading podcast' else