mirror of
http://gitea.phreedom.club/localhost_frssoft/peertube-cli
synced 2024-11-16 13:33:17 +00:00
Full description view
This commit is contained in:
parent
aff86e836d
commit
00a2f0d6b3
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue