This commit is contained in:
Lilith Ashley Nyx Arson 🔥 2024-11-03 20:44:38 +01:00
parent 47f5033687
commit 7b8b80be9f
Signed by: lilith
SSH key fingerprint: SHA256:LAjgsAMyT3LO2JVtr6fQ4N3RTYoRRlIm5wAKsbDife4

View file

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