From 1fbd34a1bec0ffcd8a1d6df91df10971cc3f0c18 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 4 Apr 2022 12:06:37 +0300 Subject: [PATCH] Added: listen all tracks in album --- funkwhale-cli.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/funkwhale-cli.sh b/funkwhale-cli.sh index 95bbe5c..ae86a66 100755 --- a/funkwhale-cli.sh +++ b/funkwhale-cli.sh @@ -48,10 +48,19 @@ funkwhale_menu_albums_tracks() while [ $sub2_menu -eq 1 ]; do titles=$(echo $get_json | jj -l results.#.title) - menu_album_tracks_choice=$(echo "Back\nMain menu\n$titles" | fzy) + playlist=$(echo $get_json | jj -l results.#.listen_url | sed 's/"//g') + menu_album_tracks_choice=$(echo "Back\nMain menu\nListen all\n$titles" | fzy) case $menu_album_tracks_choice in "Back") sub2_menu=0 ;; - "Main menu") sub2_menu=0 && sub_menu=0 ;; + "Main menu") sub2_menu=0 && sub_menu=0 ;; + + "Listen all") + echo > playlist.m3u8 + for i in $playlist; do + echo "https://$instance$i\n" >> playlist.m3u8 + done + $default_player_command playlist.m3u8 ;; + *) play_track=$(echo $get_json | jj results.#[title="$menu_album_tracks_choice"].listen_url) $default_player_command "https://$instance$play_track" ;;