mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-25 17:11:27 +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()
|
||||
{
|
||||
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")
|
||||
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
|
||||
while [ -n "$pageindex" ]; do
|
||||
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)
|
||||
tagsload=$(default_curl_opt "$pageindex")
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
tag=$(cat tags_db/tags_$instance | fzy)
|
||||
|
||||
tag=$(cat tags_db/tags_$instance.gz | gzip -d | fzy)
|
||||
}
|
||||
|
||||
funkwhale_api_get_tracks()
|
||||
|
|
Loading…
Reference in a new issue