Compare commits

...

2 commits

Author SHA1 Message Date
localhost_frssoft bd5a14234f Added auto auth change when switch instance 2022-04-10 02:17:15 +03:00
localhost_frssoft 08f64d737a +1 genre tag 2022-04-10 02:02:24 +03:00
2 changed files with 15 additions and 0 deletions

View file

@ -19,6 +19,7 @@
"Karaoke",
"Latin",
"Metal",
"Orchestral",
"Opera",
"Pop",
"Progressive",

View file

@ -324,6 +324,20 @@ case "$choice" in
echo ''
fi
clear
export auth="$(jj -i .auth.json "$(echo $instance | sed 's/\./\\\./g')")"
if [ -n "$auth" ]; then
default_curl_opt()
{
curl -s --compressed -H "Authorization: Bearer $auth" $1
}
listen_token=$(default_curl_opt "$instance_point/users/me" | jj tokens.listen)
echo '+Authorized account+'
else
default_curl_opt()
{
curl -s --compressed $1
}
fi
get_all_avalaible_count_tracks
fi ;;