mirror of
http://gitea.phreedom.club/localhost_frssoft/peertube-cli
synced 2025-01-22 09:36:33 +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)
|
#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\nBack\nMain menu" | fzy)
|
menu_video_choice=$(echo "Play\nWait mode\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 ;;
|
||||||
"Play") $default_player_command $playlist_stream ;;
|
"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
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"peer-id-ttl-hours": 6,
|
"peer-id-ttl-hours": 6,
|
||||||
"peer-limit-global": 200,
|
"peer-limit-global": 200,
|
||||||
"peer-limit-per-torrent": 50,
|
"peer-limit-per-torrent": 50,
|
||||||
"peer-port": 59577,
|
"peer-port": 57468,
|
||||||
"peer-port-random-high": 65535,
|
"peer-port-random-high": 65535,
|
||||||
"peer-port-random-low": 49152,
|
"peer-port-random-low": 49152,
|
||||||
"peer-port-random-on-start": true,
|
"peer-port-random-on-start": true,
|
||||||
|
|
Loading…
Reference in a new issue