mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-27 17:43:02 +00:00
Added gzip compression for instance tags
This commit is contained in:
parent
f0ef665ca0
commit
30ac2c503b
@ -30,20 +30,21 @@ funkwhale_api_check_api_limits()
|
|||||||
funkwhale_api_tags()
|
funkwhale_api_tags()
|
||||||
{
|
{
|
||||||
mkdir -p tags_db
|
mkdir -p tags_db
|
||||||
if [ ! -f "tags_db/tags_$instance" ]; then
|
if [ ! -f "tags_db/tags_$instance.gz" ]; then
|
||||||
tagsload=$(default_curl_opt "$instance_point/tags?playable=true")
|
tagsload=$(default_curl_opt "$instance_point/tags?playable=true")
|
||||||
pageindex=$(echo $tagsload | jj next)
|
pageindex=$(echo $tagsload | jj next)
|
||||||
echo $tagsload | jj -l results.#.name | sed 's/"//g' > tags_db/tags_$instance
|
echo $tagsload | jj -l results.#.name | sed 's/"//g' | gzip > tags_db/tags_$instance.gz
|
||||||
clear
|
clear
|
||||||
while [ -n "$pageindex" ]; do
|
while [ -n "$pageindex" ]; do
|
||||||
echo "Loading... +$(echo $tagsload | jj results.#) tags"
|
echo "Loading... +$(echo $tagsload | jj results.#) tags"
|
||||||
echo $tagsload | jj -l results.#.name | sed 's/"//g' >> tags_db/tags_$instance
|
echo $tagsload | jj -l results.#.name | sed 's/"//g' | gzip >> tags_db/tags_$instance.gz
|
||||||
pageindex=$(echo $tagsload | jj next)
|
pageindex=$(echo $tagsload | jj next)
|
||||||
tagsload=$(default_curl_opt "$pageindex")
|
tagsload=$(default_curl_opt "$pageindex")
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
tag=$(cat tags_db/tags_$instance | fzy)
|
|
||||||
|
tag=$(cat tags_db/tags_$instance.gz | gzip -d | fzy)
|
||||||
}
|
}
|
||||||
|
|
||||||
funkwhale_api_get_tracks()
|
funkwhale_api_get_tracks()
|
||||||
|
Loading…
Reference in New Issue
Block a user