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"
|
curl -s --compressed "$instance_point/videos/$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
peertube_api_get_fulldescription()
|
||||||
|
{
|
||||||
|
curl -s --compressed "$instance_point/videos/$1/description" | jj description
|
||||||
|
}
|
||||||
|
|
||||||
peertube_menu_videos()
|
peertube_menu_videos()
|
||||||
{
|
{
|
||||||
echo "Avalaible $(jj -i preload total) 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)
|
torrent_url=$(echo $get_video | jj "$hls"files.#[resolution.id=$pref_video_quality].torrentUrl)
|
||||||
echo "Channel: $channel"
|
echo "Channel: $channel"
|
||||||
echo "Description video:\n$desc"
|
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
|
case $menu_video_choice in
|
||||||
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
||||||
"Back") sub2_menu=0 ;;
|
"Back") sub2_menu=0 ;;
|
||||||
|
@ -119,6 +125,9 @@ peertube_menu_video()
|
||||||
else
|
else
|
||||||
curl -s --tcp-fastopen --output - $video_url | $default_player_command -
|
curl -s --tcp-fastopen --output - $video_url | $default_player_command -
|
||||||
fi ;;
|
fi ;;
|
||||||
|
"Full description")
|
||||||
|
fulldesc=$(peertube_api_get_fulldescription $1)
|
||||||
|
echo "$fulldesc" | less -e ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -138,7 +147,7 @@ peertube_menu_stream()
|
||||||
#torrent_url=$(echo $get_video | jj streamingPlaylists.0.files.#[resolution.id=$pref_video_quality].torrentUrl)
|
#torrent_url=$(echo $get_video | jj streamingPlaylists.0.files.#[resolution.id=$pref_video_quality].torrentUrl)
|
||||||
echo "Channel: $channel"
|
echo "Channel: $channel"
|
||||||
echo "Description video:\n$desc"
|
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
|
case $menu_video_choice in
|
||||||
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
||||||
"Back") sub2_menu=0 ;;
|
"Back") sub2_menu=0 ;;
|
||||||
|
@ -162,6 +171,9 @@ peertube_menu_stream()
|
||||||
echo 'Stream PUBLISHED!'
|
echo 'Stream PUBLISHED!'
|
||||||
$default_player_command $playlist_stream
|
$default_player_command $playlist_stream
|
||||||
;;
|
;;
|
||||||
|
"Full description")
|
||||||
|
fulldesc=$(peertube_api_get_fulldescription $1)
|
||||||
|
echo "$fulldesc" | less -e ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue