make choiseable podcast track

This commit is contained in:
localhost_frssoft 2022-04-02 18:28:19 +03:00
parent 558f145c6d
commit e112a9dcaa

View File

@ -20,13 +20,21 @@ funkwhale_api_get_tracks_from_channel()
{
track_list=$(curl -s --compressed "$instance_point/tracks?channel=$1&playable=true&include_channels=true")
echo "Loaded $(echo $track_list | jj count) podcasts"
echo $track_list | jj -l results.#.title
listen_urls=$(echo $track_list | jj -l results.#.listen_url | sed 's/"//g')
echo > podcast.m3u8
counter=0
track_name_url="{}"
for i in $listen_urls; do
title=$(echo $track_list | jj results.$counter.title | sed 's/["#\.]//g')
track_name_url_writer=$(echo $track_name_url | jj -v $i "$title")
track_name_url="${track_name_url_writer}"
echo "https://$instance$i\n" >> podcast.m3u8
counter=$(expr $counter + 1)
done
$default_player_command podcast.m3u8
menu_podcast_choice=$(echo $track_list | jj -l 'results.#.title' | sed 's/["#\.]//g' | fzy)
play_track=$(echo $track_name_url | jj "$menu_podcast_choice")
$default_player_command "https://$instance$play_track"
}
funkwhale_get_podcasts_artists()