rewriten: delete make temp file, now make on the fly podcast channel uuid

This commit is contained in:
localhost_frssoft 2022-04-02 17:19:37 +03:00
parent d91442d5d9
commit 558f145c6d

View file

@ -38,13 +38,14 @@ funkwhale_get_podcasts_artists()
echo "$count_artists avalaible" echo "$count_artists avalaible"
artist_channels=$(jj -l -i preload 'results.#.channel.uuid' | sed 's/"//g') 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') 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 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) counter=$(expr $counter + 1)
done done
menu_podcast_choice=$(echo "$podcast_names" | fzy) 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 if [ -z $channel_uuid ]; then
echo 'Error when loading podcast' echo 'Error when loading podcast'
else else