Create config file, choice state instance, reorder menu

This commit is contained in:
localhost_frssoft 2022-03-31 01:48:53 +03:00
parent abc03c2b43
commit 756d11f99c
2 changed files with 11 additions and 2 deletions

3
config.json Normal file
View file

@ -0,0 +1,3 @@
{
"instance": "sound.redeyes.club"
}

View file

@ -1,6 +1,6 @@
#!/bin/sh
instance='sound.redeyes.club'
instance=$(jj -i config.json instance)
default_player=mpv
ordering='title'
@ -49,7 +49,7 @@ checkapilimits='Check API limits (debug)'
Exit='Exit'
while true; do
choice=$(echo "$downloadtrackspls\n$startplayer\n$checkapilimits\n$changepod\n$Exit" | fzy)
choice=$(echo "$downloadtrackspls\n$startplayer\n$changepod\n$checkapilimits\n$Exit" | fzy)
if [ "$choice" = "$downloadtrackspls" ]; then
echo 'Order by (prefix - is DESC ordering):'
@ -64,6 +64,12 @@ elif [ "$choice" = "$changepod" ]; then
echo "Type instance (ex. $instance):"
read instance
export instance
conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy)
if [ "$conf_instance_state" = 'Permanent' ]; then
jj -i config.json instance -v $instance -o config.json
else
echo ''
fi
clear
get_all_avalaible_count_tracks
elif [ "$choice" = "$checkapilimits" ]; then