mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-27 17:43:02 +00:00
switch main menu to case code
This commit is contained in:
parent
009abf2065
commit
77c62d575e
@ -95,7 +95,8 @@ Exit='Exit'
|
||||
while true; do
|
||||
choice=$(echo "$downloadtrackspls\n$startplayer\n$podcasts\n$changepod\n$checkapilimits\n$Exit" | fzy)
|
||||
|
||||
if [ "$choice" = "$downloadtrackspls" ]; then
|
||||
case "$choice" in
|
||||
"$downloadtrackspls")
|
||||
echo 'Order by (prefix - is DESC ordering):'
|
||||
ordering=$(echo 'title\n-title\ncreation_date\n-creation_date\nrelease_date\n-release_date\nrandom' | fzy)
|
||||
export ordering
|
||||
@ -107,14 +108,20 @@ if [ "$choice" = "$downloadtrackspls" ]; then
|
||||
export tag
|
||||
echo 'Enter page number: '
|
||||
read page
|
||||
load_tracks_to_playlist $page
|
||||
elif [ "$choice" = "$startplayer" ]; then
|
||||
$default_player_command playlist.m3u8
|
||||
elif [ "$choice" = "$podcasts" ]; then
|
||||
load_tracks_to_playlist $page ;;
|
||||
|
||||
|
||||
"$startplayer")
|
||||
$default_player_command playlist.m3u8 ;;
|
||||
|
||||
|
||||
"$podcasts")
|
||||
echo 'Enter page number: '
|
||||
read page
|
||||
funkwhale_get_podcasts_artists $page
|
||||
elif [ "$choice" = "$changepod" ]; then
|
||||
funkwhale_get_podcasts_artists $page ;;
|
||||
|
||||
|
||||
"$changepod")
|
||||
if [ 'Choice from list' = "$(echo 'Choice from list\nManual input' | fzy)" ]; then
|
||||
instance=$(jj -l -i config.json public_list_instances | sed 's/"//g' | fzy)
|
||||
else
|
||||
@ -131,10 +138,14 @@ elif [ "$choice" = "$changepod" ]; then
|
||||
echo ''
|
||||
fi
|
||||
clear
|
||||
get_all_avalaible_count_tracks
|
||||
elif [ "$choice" = "$checkapilimits" ]; then
|
||||
funkwhale_api_check_api_limits | more
|
||||
elif [ "$choice" = "$Exit" ]; then
|
||||
exit 0
|
||||
fi
|
||||
get_all_avalaible_count_tracks ;;
|
||||
|
||||
|
||||
"$checkapilimits")
|
||||
funkwhale_api_check_api_limits | more ;;
|
||||
|
||||
|
||||
"$Exit")
|
||||
exit 0 ;;
|
||||
esac
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user