Update tracker url in mass in Deluge
Hi,
This morning, i had again the issue that one of the tracker i am on, decided to change url. And i needed to change url of many torrents in Deluge in mass.
The principle is easy: stop the deluge and deluge-web services, change the url using sed command then restart services
OLD_TRACKER_URL and NEW_TRACKER_URL represent variable you have to change depending your tracker
#logon and elevate to root
sudo bash
#go to the Deluge »s profile folder
cd /var/lib/deluge/.config/
#stop Deluge service (here the daemon+web)
systemctl stop deluged deluge-web
#backup the profile
cp -r deluge deluge.old
#The setup runs with user « deluge », take back the ownership of folder deluge.old
chown -R deluge:deluge deluge.old
#go to the torrents.state location
cd deluge/state
#[Optional: count the number of torrent with old tracker URL (or passkey)]
cat torrents.state|grep -ic OLD_TRACKER_URL
#change the tracker URL to the new one
sed -i ‘s#OLD_TRACKER_URL#NEW_TRACKER_URL#g’ torrents.state
#[Optional: check the number of file is the same as prior one]
cat torrents.state|grep -ic NEW_TRACKER_URL
#restart daemons
systemctl start deluged deluge-web
Share this content:
Laisser un commentaire