mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 15:59:21 +02: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
|
while true; do
|
||||||
choice=$(echo "$downloadtrackspls\n$startplayer\n$podcasts\n$changepod\n$checkapilimits\n$Exit" | fzy)
|
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):'
|
echo 'Order by (prefix - is DESC ordering):'
|
||||||
ordering=$(echo 'title\n-title\ncreation_date\n-creation_date\nrelease_date\n-release_date\nrandom' | fzy)
|
ordering=$(echo 'title\n-title\ncreation_date\n-creation_date\nrelease_date\n-release_date\nrandom' | fzy)
|
||||||
export ordering
|
export ordering
|
||||||
|
@ -107,14 +108,20 @@ if [ "$choice" = "$downloadtrackspls" ]; then
|
||||||
export tag
|
export tag
|
||||||
echo 'Enter page number: '
|
echo 'Enter page number: '
|
||||||
read page
|
read page
|
||||||
load_tracks_to_playlist $page
|
load_tracks_to_playlist $page ;;
|
||||||
elif [ "$choice" = "$startplayer" ]; then
|
|
||||||
$default_player_command playlist.m3u8
|
|
||||||
elif [ "$choice" = "$podcasts" ]; then
|
"$startplayer")
|
||||||
|
$default_player_command playlist.m3u8 ;;
|
||||||
|
|
||||||
|
|
||||||
|
"$podcasts")
|
||||||
echo 'Enter page number: '
|
echo 'Enter page number: '
|
||||||
read page
|
read page
|
||||||
funkwhale_get_podcasts_artists $page
|
funkwhale_get_podcasts_artists $page ;;
|
||||||
elif [ "$choice" = "$changepod" ]; then
|
|
||||||
|
|
||||||
|
"$changepod")
|
||||||
if [ 'Choice from list' = "$(echo 'Choice from list\nManual input' | fzy)" ]; then
|
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)
|
instance=$(jj -l -i config.json public_list_instances | sed 's/"//g' | fzy)
|
||||||
else
|
else
|
||||||
|
@ -131,10 +138,14 @@ elif [ "$choice" = "$changepod" ]; then
|
||||||
echo ''
|
echo ''
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
get_all_avalaible_count_tracks
|
get_all_avalaible_count_tracks ;;
|
||||||
elif [ "$choice" = "$checkapilimits" ]; then
|
|
||||||
funkwhale_api_check_api_limits | more
|
|
||||||
elif [ "$choice" = "$Exit" ]; then
|
"$checkapilimits")
|
||||||
exit 0
|
funkwhale_api_check_api_limits | more ;;
|
||||||
fi
|
|
||||||
|
|
||||||
|
"$Exit")
|
||||||
|
exit 0 ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue