mirror of
http://gitea.phreedom.club/localhost_frssoft/peertube-cli
synced 2024-11-16 10:23:16 +00:00
Feature: Wait mode for live streams
This commit is contained in:
parent
51326f326a
commit
aff86e836d
|
@ -138,11 +138,30 @@ 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\nBack\nMain menu" | fzy)
|
||||
menu_video_choice=$(echo "Play\nWait mode\nBack\nMain menu" | fzy)
|
||||
case $menu_video_choice in
|
||||
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
||||
"Back") sub2_menu=0 ;;
|
||||
"Play") $default_player_command $playlist_stream ;;
|
||||
|
||||
"Wait mode")
|
||||
playlist_stream=$(echo $get_video | jj streamingPlaylists.0.playlistUrl)
|
||||
echo 'Wait mode enabled...'
|
||||
echo 'Stream will be played when published state'
|
||||
while [ -z $playlist_stream ]; do
|
||||
get_video=$(peertube_api_get_video $1)
|
||||
playlist_stream=$(echo $get_video | jj streamingPlaylists.0.playlistUrl)
|
||||
wait=15
|
||||
while [ $wait -gt 0 ]; do
|
||||
date
|
||||
sleep 1
|
||||
wait=$(expr $wait - 1)
|
||||
done
|
||||
done
|
||||
clear
|
||||
echo 'Stream PUBLISHED!'
|
||||
$default_player_command $playlist_stream
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"peer-id-ttl-hours": 6,
|
||||
"peer-limit-global": 200,
|
||||
"peer-limit-per-torrent": 50,
|
||||
"peer-port": 59577,
|
||||
"peer-port": 57468,
|
||||
"peer-port-random-high": 65535,
|
||||
"peer-port-random-low": 49152,
|
||||
"peer-port-random-on-start": true,
|
||||
|
|
Loading…
Reference in a new issue