mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-27 17:43:02 +00:00
Playlist m3u8 and titles tracks added
This commit is contained in:
parent
40b673cafc
commit
a7edda6df2
@ -11,7 +11,7 @@ funkwhale_api_check_api_limits()
|
|||||||
|
|
||||||
funkwhale_api_get_tracks()
|
funkwhale_api_get_tracks()
|
||||||
{
|
{
|
||||||
get_json=$(curl -s "https://$instance/api/v1/tracks?ordering=$ordering&playable=true&page=$1")
|
get_json=$(curl -s "https://$instance/api/v1/tracks?ordering=$ordering&playable=true&page=$1" 2>&1 | tee preload)
|
||||||
export count_all_tracks=$(echo $get_json | jj -l count)
|
export count_all_tracks=$(echo $get_json | jj -l count)
|
||||||
echo $get_json | jj -l 'results.#.uploads.0.listen_url' | sed 's/"//g'
|
echo $get_json | jj -l 'results.#.uploads.0.listen_url' | sed 's/"//g'
|
||||||
}
|
}
|
||||||
@ -23,8 +23,14 @@ funkwhale_api_get_albums()
|
|||||||
|
|
||||||
load_tracks_to_playlist()
|
load_tracks_to_playlist()
|
||||||
{
|
{
|
||||||
for i in $(funkwhale_api_get_tracks $1); do
|
echo "Loading page $1 ..."
|
||||||
echo "https://$instance$i" >> playlist
|
echo '#EXTM3U\n' > playlist.m3u8
|
||||||
|
counter_titles=0
|
||||||
|
for i in $(funkwhale_api_get_tracks $1); do
|
||||||
|
title=$(cat preload | jj results."$counter_titles".title)
|
||||||
|
echo "#EXTINF:#,$title" >> playlist.m3u8
|
||||||
|
counter_titles=$(expr $counter_titles + 1)
|
||||||
|
echo "https://$instance$i\n" >> playlist.m3u8
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +50,7 @@ if [ "$choice" = "$downloadtrackspls" ]; then
|
|||||||
read page
|
read page
|
||||||
load_tracks_to_playlist $page
|
load_tracks_to_playlist $page
|
||||||
elif [ "$choice" = "$startplayer" ]; then
|
elif [ "$choice" = "$startplayer" ]; then
|
||||||
$default_player --no-vid --no-ytdl --playlist=playlist
|
$default_player --no-vid --no-ytdl playlist.m3u8
|
||||||
elif [ "$choice" = "$checkapilimits" ]; then
|
elif [ "$choice" = "$checkapilimits" ]; then
|
||||||
funkwhale_api_check_api_limits | more
|
funkwhale_api_check_api_limits | more
|
||||||
elif [ "$choice" = "$Exit" ]; then
|
elif [ "$choice" = "$Exit" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user