mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 01:01:27 +00:00
added search by tag
This commit is contained in:
parent
c4f18d391d
commit
9e252d492c
11
config.json
11
config.json
|
@ -1,3 +1,14 @@
|
||||||
{
|
{
|
||||||
"instance": "sound.redeyes.club"
|
"instance": "sound.redeyes.club"
|
||||||
|
"tags": [
|
||||||
|
"TagOFF",
|
||||||
|
"8bit",
|
||||||
|
"Ambient",
|
||||||
|
"Bluez",
|
||||||
|
"Reggae",
|
||||||
|
"Electronic",
|
||||||
|
"Electronica",
|
||||||
|
"Classic",
|
||||||
|
"Violin"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue