basic playlist generation

This commit is contained in:
localhost_frssoft 2024-07-23 22:36:05 +03:00
parent ff42699870
commit f219662ee7

17
funkwlplay Executable file
View File

@ -0,0 +1,17 @@
#!/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