mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-25 11:01:27 +00:00
added count tracks view and curl silent
This commit is contained in:
parent
4b1a142e81
commit
40b673cafc
|
@ -6,17 +6,19 @@ ordering='title'
|
||||||
|
|
||||||
funkwhale_api_check_api_limits()
|
funkwhale_api_check_api_limits()
|
||||||
{
|
{
|
||||||
curl "https://$instance/api/v1/rate-limit/" | jj -p
|
curl -s "https://$instance/api/v1/rate-limit/" | jj -p
|
||||||
}
|
}
|
||||||
|
|
||||||
funkwhale_api_get_tracks()
|
funkwhale_api_get_tracks()
|
||||||
{
|
{
|
||||||
curl "https://$instance/api/v1/tracks?ordering=$ordering&playable=true&page=$1" | jj -l 'results.#.uploads.0.listen_url' | sed 's/"//g'
|
get_json=$(curl -s "https://$instance/api/v1/tracks?ordering=$ordering&playable=true&page=$1")
|
||||||
|
export count_all_tracks=$(echo $get_json | jj -l count)
|
||||||
|
echo $get_json | jj -l 'results.#.uploads.0.listen_url' | sed 's/"//g'
|
||||||
}
|
}
|
||||||
|
|
||||||
funkwhale_api_get_albums()
|
funkwhale_api_get_albums()
|
||||||
{
|
{
|
||||||
curl https://$instance/api/v1/albums/ | jj -p results
|
curl -s https://$instance/api/v1/albums/ | jj -p results
|
||||||
}
|
}
|
||||||
|
|
||||||
load_tracks_to_playlist()
|
load_tracks_to_playlist()
|
||||||
|
@ -26,6 +28,9 @@ for i in $(funkwhale_api_get_tracks $1); do
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
funkwhale_api_get_tracks 1 1>> /dev/null
|
||||||
|
echo "Tracks avalaible on $instance: $count_all_tracks\n"
|
||||||
|
|
||||||
downloadtrackspls='Download tracks in playlist'
|
downloadtrackspls='Download tracks in playlist'
|
||||||
startplayer='Start player'
|
startplayer='Start player'
|
||||||
checkapilimits='Check API limits (debug)'
|
checkapilimits='Check API limits (debug)'
|
||||||
|
|
Loading…
Reference in a new issue