Compare commits

...

3 commits

Author SHA1 Message Date
localhost_frssoft d9466160eb Connected message 2022-04-06 21:48:54 +03:00
localhost_frssoft 2fbb089bc4 Fix: share stream direct link 2022-04-06 20:20:25 +03:00
localhost_frssoft ff21d3087b Share feature 2022-04-06 19:01:10 +03:00

View file

@ -122,7 +122,7 @@ peertube_menu_video()
echo '_____' echo '_____'
fulldescr="\nFull description" fulldescr="\nFull description"
fi fi
menu_video_choice=$(echo "Play$fulldescr\nBack\nMain menu" | fzy) menu_video_choice=$(echo "Play$fulldescr\nShare\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 ;;
@ -145,6 +145,12 @@ peertube_menu_video()
"Full description") "Full description")
fulldesc=$(peertube_api_get_fulldescription $1) fulldesc=$(peertube_api_get_fulldescription $1)
echo "$fulldesc" | less -e ;; echo "$fulldesc" | less -e ;;
"Share")
echo "Link: https://$instance/w/$1"
echo "Direct links:"
echo "$(echo $get_video | jj -l "$hls"files.#.resolution.label)"
echo "$(echo $get_video | jj -l "$hls"files.#.fileUrl)" ;;
esac esac
done done
} }
@ -173,7 +179,7 @@ peertube_menu_stream()
echo '_____' echo '_____'
fulldescr="\nFull description" fulldescr="\nFull description"
fi fi
menu_video_choice=$(echo "Play\nWait mode$fulldescr\nBack\nMain menu" | fzy) menu_video_choice=$(echo "Play\nWait mode$fulldescr\nShare\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 ;;
@ -199,7 +205,11 @@ peertube_menu_stream()
;; ;;
"Full description") "Full description")
fulldesc=$(peertube_api_get_fulldescription $1) fulldesc=$(peertube_api_get_fulldescription $1)
echo "$fulldesc" | less -e ;; echo "$fulldesc" | less -e ;;
"Share")
echo "Link: https://$instance/w/$1"
echo "Direct link: $playlist_stream" ;;
esac esac
done done
} }
@ -238,6 +248,8 @@ menu_settings()
if [ -z $(check_connect) ]; then if [ -z $(check_connect) ]; then
echo 'Connect error...' echo 'Connect error...'
echo 'Please retry later or switch instance' echo 'Please retry later or switch instance'
else
echo "Connected to $instance"
fi fi
version=$(peertube_api_version_server) version=$(peertube_api_version_server)
torrent_init torrent_init
@ -289,6 +301,8 @@ while true; do
if [ -z $(check_connect) ]; then if [ -z $(check_connect) ]; then
echo 'Connect error...' echo 'Connect error...'
echo 'Please retry later or switch instance' echo 'Please retry later or switch instance'
else
echo "Connected to $instance"
fi fi
export version=$(peertube_api_version_server) export version=$(peertube_api_version_server)
conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy) conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy)