added search by tag

This commit is contained in:
localhost_frssoft 2022-03-31 21:19:08 +03:00
parent c4f18d391d
commit 9e252d492c
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,14 @@
{ {
"instance": "sound.redeyes.club" "instance": "sound.redeyes.club"
"tags": [
"TagOFF",
"8bit",
"Ambient",
"Bluez",
"Reggae",
"Electronic",
"Electronica",
"Classic",
"Violin"
]
} }

View File

@ -11,7 +11,7 @@ funkwhale_api_check_api_limits()
funkwhale_api_get_tracks() funkwhale_api_get_tracks()
{ {
get_json=$(curl -s --compressed "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&tag=$tag" 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'
} }
@ -90,6 +90,12 @@ if [ "$choice" = "$downloadtrackspls" ]; then
echo 'Order by (prefix - is DESC ordering):' echo 'Order by (prefix - is DESC ordering):'
ordering=$(echo 'title\n-title\ncreation_date\n-creation_date\nrelease_date\n-release_date\nrandom' | fzy) ordering=$(echo 'title\n-title\ncreation_date\n-creation_date\nrelease_date\n-release_date\nrandom' | fzy)
export ordering export ordering
echo 'Tags:'
tag=$(jj -l -i config.json tags | sed 's/"//g' | fzy)
if [ "$tag" = "TagOFF" ]; then
tag=
fi
export tag
echo 'Enter page number: ' echo 'Enter page number: '
read page read page
load_tracks_to_playlist $page load_tracks_to_playlist $page