Full description view

This commit is contained in:
localhost_frssoft 2022-04-06 14:11:24 +03:00
parent aff86e836d
commit 00a2f0d6b3
1 changed files with 14 additions and 2 deletions

View File

@ -51,6 +51,11 @@ peertube_api_get_video()
curl -s --compressed "$instance_point/videos/$1"
}
peertube_api_get_fulldescription()
{
curl -s --compressed "$instance_point/videos/$1/description" | jj description
}
peertube_menu_videos()
{
echo "Avalaible $(jj -i preload total) videos"
@ -99,7 +104,8 @@ peertube_menu_video()
torrent_url=$(echo $get_video | jj "$hls"files.#[resolution.id=$pref_video_quality].torrentUrl)
echo "Channel: $channel"
echo "Description video:\n$desc"
menu_video_choice=$(echo "Play\nBack\nMain menu" | fzy)
echo '_____'
menu_video_choice=$(echo "Play\nFull description\nBack\nMain menu" | fzy)
case $menu_video_choice in
"Main menu") sub2_menu=0 && sub_menu=0 ;;
"Back") sub2_menu=0 ;;
@ -119,6 +125,9 @@ peertube_menu_video()
else
curl -s --tcp-fastopen --output - $video_url | $default_player_command -
fi ;;
"Full description")
fulldesc=$(peertube_api_get_fulldescription $1)
echo "$fulldesc" | less -e ;;
esac
done
}
@ -138,7 +147,7 @@ peertube_menu_stream()
#torrent_url=$(echo $get_video | jj streamingPlaylists.0.files.#[resolution.id=$pref_video_quality].torrentUrl)
echo "Channel: $channel"
echo "Description video:\n$desc"
menu_video_choice=$(echo "Play\nWait mode\nBack\nMain menu" | fzy)
menu_video_choice=$(echo "Play\nWait mode\nFull description\nBack\nMain menu" | fzy)
case $menu_video_choice in
"Main menu") sub2_menu=0 && sub_menu=0 ;;
"Back") sub2_menu=0 ;;
@ -162,6 +171,9 @@ peertube_menu_stream()
echo 'Stream PUBLISHED!'
$default_player_command $playlist_stream
;;
"Full description")
fulldesc=$(peertube_api_get_fulldescription $1)
echo "$fulldesc" | less -e ;;
esac
done
}