Skip to content

Instantly share code, notes, and snippets.

@darrentmorgan
darrentmorgan / deluge_reannounce.sh
Last active July 12, 2024 13:26
A script to re-announce torrents in Deluge when they get stuck with the error "Error: unregistered torrent". It has built in limiting.
#!/bin/bash
torrentid="$1"
torrentname="$2"
torrentpath="$3"
max_attempts=100
ddport=$(grep '"daemon_port": [0-9]*' ~/.config/deluge/core.conf | awk -F ': ' '{print $2}' | awk -F ',' '{print $1}')
log() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1" >> ~/deluge_reannounce.log