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