mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-27 17:43:02 +00:00
compressed requests
This commit is contained in:
parent
60edd9f52e
commit
c4f18d391d
@ -6,18 +6,18 @@ default_player_command='mpv --no-vid --no-ytdl'
|
|||||||
|
|
||||||
funkwhale_api_check_api_limits()
|
funkwhale_api_check_api_limits()
|
||||||
{
|
{
|
||||||
curl -s "https://$instance/api/v1/rate-limit/" | jj -p
|
curl -s --compressed "https://$instance/api/v1/rate-limit/" | jj -p
|
||||||
}
|
}
|
||||||
|
|
||||||
funkwhale_api_get_tracks()
|
funkwhale_api_get_tracks()
|
||||||
{
|
{
|
||||||
get_json=$(curl -s "https://$instance/api/v1/tracks?ordering=$ordering&playable=true&page=$1" 2>&1 | tee preload)
|
get_json=$(curl -s --compressed "https://$instance/api/v1/tracks?ordering=$ordering&playable=true&page=$1" 2>&1 | tee preload)
|
||||||
jj -i preload -l 'results.#.uploads.0.listen_url' | sed 's/"//g'
|
jj -i preload -l 'results.#.uploads.0.listen_url' | sed 's/"//g'
|
||||||
}
|
}
|
||||||
|
|
||||||
funkwhale_api_get_tracks_from_channel()
|
funkwhale_api_get_tracks_from_channel()
|
||||||
{
|
{
|
||||||
track_list=$(curl -s "https://$instance/api/v1/tracks?channel=$1&playable=true&include_channels=true")
|
track_list=$(curl -s --compressed "https://$instance/api/v1/tracks?channel=$1&playable=true&include_channels=true")
|
||||||
echo "Loaded $(echo $track_list | jj count) podcasts"
|
echo "Loaded $(echo $track_list | jj count) podcasts"
|
||||||
echo $track_list | jj -l results.#.title
|
echo $track_list | jj -l results.#.title
|
||||||
listen_urls=$(echo $track_list | jj -l results.#.listen_url | sed 's/"//g')
|
listen_urls=$(echo $track_list | jj -l results.#.listen_url | sed 's/"//g')
|
||||||
@ -31,7 +31,7 @@ funkwhale_api_get_tracks_from_channel()
|
|||||||
funkwhale_get_podcasts_artists()
|
funkwhale_get_podcasts_artists()
|
||||||
{
|
{
|
||||||
echo 'Loading podcast artists...'
|
echo 'Loading podcast artists...'
|
||||||
curl -s --output preload "https://$instance/api/v1/artists?ordering=-creation_date&playable=true&include_channels=true&content_category=podcast&page=$1"
|
curl -s --compressed --output preload "https://$instance/api/v1/artists?ordering=-creation_date&playable=true&include_channels=true&content_category=podcast&page=$1"
|
||||||
counter=0
|
counter=0
|
||||||
count_artists=$(jj -i preload count)
|
count_artists=$(jj -i preload count)
|
||||||
echo "$count_artists avalaible"
|
echo "$count_artists avalaible"
|
||||||
|
Loading…
Reference in New Issue
Block a user