Fixes in podcasts

This commit is contained in:
localhost_frssoft 2022-04-02 13:16:13 +03:00
parent eefc247b64
commit ce9575dac5

View File

@ -36,17 +36,20 @@ funkwhale_get_podcasts_artists()
counter=0
count_artists=$(jj -i preload count)
echo "$count_artists avalaible"
artist_channels=$(jj -i preload -l 'results.#.channel.uuid' | sed 's/"//g')
artist_names=$(mktemp)
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)
for i in $artist_channels; do
jj -i preload results."$counter".name | sed 's/\./_/g' >> $artist_names
jj -i $temp_artists -v "$i" -o $temp_artists "$(jj -i preload results.$counter.name | sed 's/\./_/g')"
jj -i $temp_artists -v "$i" -o $temp_artists "$(jj -i preload results.$counter.name | sed 's/\./_/g' | sed 's/\"//g')"
counter=$(expr $counter + 1)
done
menu_artist_choice=$(cat $artist_names | fzy)
channel_uuid=$(jj -i $temp_artists "$menu_artist_choice")
menu_podcast_choice=$(echo $podcast_names | fzy)
channel_uuid=$(jj -i $temp_artists "$menu_podcast_choice")
if [ -z $channel_uuid ]; then
echo 'Error when loading podcast'
else
funkwhale_api_get_tracks_from_channel $channel_uuid
fi
}
load_tracks_to_playlist()