more informative counter track on instance and fix point api

This commit is contained in:
localhost_frssoft 2022-04-02 03:01:25 +03:00
parent 8b60996e79
commit 009abf2065

View file

@ -74,7 +74,13 @@ get_all_avalaible_count_tracks()
{
funkwhale_api_get_tracks 1 1>> /dev/null
count_all_tracks=$(jj -i preload -l count)
echo "Tracks avalaible on $instance: $count_all_tracks\n"
if [ -z $count_all_tracks ]; then
echo 'Error: Connection error or API limit expired'
elif [ $count_all_tracks -eq 0 ]; then
echo 'Error: No tracks'
else
echo "Tracks avalaible on $instance: $count_all_tracks\n"
fi
}
get_all_avalaible_count_tracks
@ -115,7 +121,9 @@ elif [ "$choice" = "$changepod" ]; then
echo "Type instance (ex. $instance):"
read instance
fi
export instance
export instance_point="https://$instance/api/v1"
conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy)
if [ "$conf_instance_state" = 'Permanent' ]; then
jj -i config.json instance -v $instance -o config.json