From 7b8b80be9f85ca19ebd44f33db785c42247a2fa0 Mon Sep 17 00:00:00 2001 From: Ashley Graves Date: Sun, 3 Nov 2024 20:44:38 +0100 Subject: [PATCH] guh --- tracker-add-auto.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tracker-add-auto.sh b/tracker-add-auto.sh index 7a2aa30..84f7802 100644 --- a/tracker-add-auto.sh +++ b/tracker-add-auto.sh @@ -2,6 +2,7 @@ add_trackers() { torrent_hash=$1 + torrent_name=$2 id=$2 for base_url in "$TORRENTLIST"; do if [ ! -f /tmp/trackers.txt ]; then @@ -24,7 +25,7 @@ add_trackers() { fi echo "URL for ${base_url}" - echo "Adding trackers for $torrent_name..." + echo "Adding trackers for $torrent_name ($torrent_hash)" for tracker in $(cat /tmp/trackers.txt); do echo -n "${tracker}..." @@ -47,7 +48,7 @@ while true; do if [ ! -f /tmp/TTAA.$id.lock ]; then hash="$(transmission-remote "$HOSTPORT" --authenv --torrent "$id" --info | grep '^ Hash: ' | awk '{ print $2 }')" torrent_name="$(transmission-remote "$HOSTPORT" --authenv --torrent "$id" --info | grep '^ Name: ' | cut -c 9-)" - add_trackers "$hash" "$id" & + add_trackers "$hash" "$torrent_name" "$id" & touch /tmp/TTAA.$id.lock fi done