diff --git a/peertube-cli.sh b/peertube-cli.sh index 31a6ae8..e3e4a82 100755 --- a/peertube-cli.sh +++ b/peertube-cli.sh @@ -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 }