From cbd398b7ec28e50ecc6a11a394a8ddb4537ce8c3 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Tue, 5 Apr 2022 21:26:43 +0300 Subject: [PATCH] Fixed RPC port; clear terminal before video info --- peertube-cli.sh | 10 ++++++---- transmission-daemon/settings.json | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/peertube-cli.sh b/peertube-cli.sh index ff5093b..5b059d6 100755 --- a/peertube-cli.sh +++ b/peertube-cli.sh @@ -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 diff --git a/transmission-daemon/settings.json b/transmission-daemon/settings.json index e8fdf2f..c1cca56 100644 --- a/transmission-daemon/settings.json +++ b/transmission-daemon/settings.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",