批量更改Transmission的tracker

某些站会改tracker,所以需要批量更改已有种子的tracker

#!/bin/bash

username="yaoge123"
password="yaoge123"
host="localhost:9091"

for i in $(transmission-remote $host -n $username:$password -l|awk '{print $1}'|grep -o -P '\d+')
do
	out=$(transmission-remote $host -n $username:$password -t $i -it|grep $1)
	if [ -n "$out" ];then
		id=$(echo "$out"|awk -F: '{print $1}'|grep -o -P '\d+')
		echo $i
		transmission-remote $host -n $username:$password -t $i -tr $id
		transmission-remote $host -n $username:$password -t $i -td $2
	fi
done

用法:./chtracker.sh https://old.tracker.com https://new.tracker.com/announce.php?passkey=xxxxxxxxxx

5 thoughts on “批量更改Transmission的tracker Add Yours?

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据