mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 22:59:19 +02:00
sub menu reconfigured
This commit is contained in:
parent
e7ca06a9e8
commit
2c942fd994
|
@ -19,37 +19,46 @@ funkwhale_api_get_tracks()
|
||||||
|
|
||||||
funkwhale_api_get_tracks_from_channel()
|
funkwhale_api_get_tracks_from_channel()
|
||||||
{
|
{
|
||||||
sub_menu=1
|
sub2_menu=1
|
||||||
track_list=$(curl -s --compressed "$instance_point/tracks?channel=$1&playable=true&include_channels=true")
|
track_list=$(curl -s --compressed "$instance_point/tracks?channel=$1&playable=true&include_channels=true")
|
||||||
echo "Loaded $(echo $track_list | jj count) podcasts"
|
echo "Loaded $(echo $track_list | jj count) podcasts"
|
||||||
|
|
||||||
while [ $sub_menu -eq 1 ]; do
|
while [ $sub2_menu -eq 1 ]; do
|
||||||
menu_podcast_choice=$(echo $track_list | jj -l 'results.#.title' | fzy)
|
titles=$(echo $track_list | jj -l 'results.#.title')
|
||||||
|
menu_podcast_choice=$(echo "Main menu\nBack\n$titles" | fzy)
|
||||||
|
case $menu_podcast_choice in
|
||||||
|
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
||||||
|
"Back") sub2_menu=0 ;;
|
||||||
|
*)
|
||||||
play_track=$(echo $track_list | jj results.#[title="$menu_podcast_choice"].listen_url)
|
play_track=$(echo $track_list | jj results.#[title="$menu_podcast_choice"].listen_url)
|
||||||
$default_player_command "https://$instance$play_track"
|
$default_player_command "https://$instance$play_track" ;;
|
||||||
case $(echo "Back\nMain menu" | fzy) in
|
|
||||||
"Back") echo '' ;;
|
|
||||||
|
|
||||||
"Main menu") sub_menu=0 ;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
funkwhale_get_podcasts_artists()
|
funkwhale_get_podcasts_artists()
|
||||||
{
|
{
|
||||||
|
sub_menu=1
|
||||||
echo 'Loading podcast artists...'
|
echo 'Loading podcast artists...'
|
||||||
curl -s --compressed --output preload "$instance_point/artists?ordering=-creation_date&playable=true&include_channels=true&content_category=podcast&page=$1"
|
curl -s --compressed --output preload "$instance_point/artists?ordering=-creation_date&playable=true&include_channels=true&content_category=podcast&page=$1"
|
||||||
|
while [ $sub_menu -eq 1 ]; do
|
||||||
count_artists=$(jj -i preload count)
|
count_artists=$(jj -i preload count)
|
||||||
echo "$count_artists avalaible"
|
echo "$count_artists avalaible"
|
||||||
podcast_names=$(jj -l -i preload results.#.name)
|
podcast_names=$(jj -l -i preload results.#.name)
|
||||||
menu_podcast_choice=$(echo "$podcast_names" | fzy)
|
menu_podcast_choice=$(echo "Main menu\n$podcast_names" | fzy)
|
||||||
|
case $menu_podcast_choice in
|
||||||
|
"Main menu") sub_menu=0 ;;
|
||||||
|
|
||||||
|
*)
|
||||||
channel_uuid=$(jj -i preload results.#[name="$menu_podcast_choice"].channel.uuid)
|
channel_uuid=$(jj -i preload results.#[name="$menu_podcast_choice"].channel.uuid)
|
||||||
|
|
||||||
if [ -z $channel_uuid ]; then
|
if [ -z $channel_uuid ]; then
|
||||||
echo 'Error when loading podcast'
|
echo 'Error when loading podcast'
|
||||||
else
|
else
|
||||||
funkwhale_api_get_tracks_from_channel $channel_uuid
|
funkwhale_api_get_tracks_from_channel $channel_uuid
|
||||||
fi
|
fi ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
load_tracks_to_playlist()
|
load_tracks_to_playlist()
|
||||||
|
|
Loading…
Reference in New Issue