Fixed RPC port; clear terminal before video info

This commit is contained in:
localhost_frssoft 2022-04-05 21:26:43 +03:00
parent b05c5c0c20
commit cbd398b7ec
2 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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",