mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-24 00:29:20 +02:00
18 lines
429 B
Plaintext
18 lines
429 B
Plaintext
|
#!/bin/bash
|
||
|
fw_instance="${wf_instance:=open.audio}"
|
||
|
|
||
|
get(){
|
||
|
curl $1
|
||
|
}
|
||
|
|
||
|
case $1 in
|
||
|
"tag") search="tag=$2" ;;
|
||
|
"search") read input ; search="q=$input" ;;
|
||
|
esac
|
||
|
echo '#EXTM3U' > playlist.m3u8
|
||
|
for i in $(cat instances); do
|
||
|
get "https://$i/api/v1/tracks?playable=true&hidden=false&include_channels=false&order=random&$search" | jq -r ".results.[] | \"#EXTINF:-1, \\(.title)\nhttps://$i\\(.listen_url)\"" >> playlist.m3u8 &
|
||
|
done
|
||
|
|
||
|
|