mirror of
http://gitea.phreedom.club/localhost_frssoft/peertube-cli
synced 2024-11-16 07:13:17 +00:00
Fixed RPC port; clear terminal before video info
This commit is contained in:
parent
b05c5c0c20
commit
cbd398b7ec
|
@ -3,6 +3,7 @@
|
|||
instance=$(jj -i config.json instance)
|
||||
pref_video_quality=$(jj -i config.json prefer_quality_video)
|
||||
torrent_enabled=$(jj -i config.json torrent_enabled)
|
||||
rpcport=9095
|
||||
instance_hist='instance.hist'
|
||||
ordering='title'
|
||||
default_player_command='mpv --network-timeout=30 --profile=low-latency'
|
||||
|
@ -12,7 +13,7 @@ instance_point="https://$instance/api/v1"
|
|||
torrent_init()
|
||||
{
|
||||
if [ "$torrent_enabled" = 'true' ]; then
|
||||
transmission-daemon -T -g transmission-daemon -w temp --password ''
|
||||
transmission-daemon -T -g transmission-daemon -w temp --password '' -p $rpcport
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -49,6 +50,7 @@ peertube_menu_videos()
|
|||
|
||||
peertube_menu_video()
|
||||
{
|
||||
clear
|
||||
sub2_menu=1
|
||||
get_video=$(peertube_api_get_video $1)
|
||||
while [ $sub2_menu -eq 1 ]; do
|
||||
|
@ -73,9 +75,9 @@ peertube_menu_video()
|
|||
fi
|
||||
|
||||
if [ "$torrent_enabled" = 'true' ]; then
|
||||
transmission-remote 9095 -a $torrent_url
|
||||
transmission-remote $rpcport -a $torrent_url
|
||||
curl -s --tcp-fastopen --output - $video_url | $default_player_command -
|
||||
transmission-remote 9095 -t 1 -rad
|
||||
transmission-remote $rpcport -t 1 -rad
|
||||
else
|
||||
curl -s --tcp-fastopen --output - $video_url | $default_player_command -
|
||||
fi ;;
|
||||
|
@ -103,7 +105,7 @@ menu_settings()
|
|||
'true')
|
||||
jj -i config.json torrent_enabled -v 'false' -o config.json
|
||||
export torrent_enabled='false'
|
||||
transmission-remote 9095 --exit ;;
|
||||
transmission-remote $rpcport --exit ;;
|
||||
|
||||
'false')
|
||||
jj -i config.json torrent_enabled -v 'true' -o config.json
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"peer-id-ttl-hours": 6,
|
||||
"peer-limit-global": 200,
|
||||
"peer-limit-per-torrent": 50,
|
||||
"peer-port": 49910,
|
||||
"peer-port": 59577,
|
||||
"peer-port-random-high": 65535,
|
||||
"peer-port-random-low": 49152,
|
||||
"peer-port-random-on-start": true,
|
||||
|
@ -46,7 +46,7 @@
|
|||
"rpc-host-whitelist": "",
|
||||
"rpc-host-whitelist-enabled": true,
|
||||
"rpc-password": "",
|
||||
"rpc-port": 9091,
|
||||
"rpc-port": 9095,
|
||||
"rpc-url": "/transmission/",
|
||||
"rpc-username": "",
|
||||
"rpc-whitelist": "127.0.0.1,::1",
|
||||
|
|
Loading…
Reference in a new issue