File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ # Get more trackers
2+
3+ See no peers for some torrent(s)? Add more tracker(s) from Transmission
4+
5+ ## Installation
6+ * Download script and make it executable:
7+
8+ ```
9+ wget --no-check-certificate -O /opt/bin/add_trackers.sh https://raw.githubusercontent.com/AndrewMarchukov/tracker-add/master/tracker-add.sh
10+ chmod +x /opt/bin/add_trackers.sh
11+ ```
12+
13+ ## Usage
14+
15+ Run script to add some more trackers for active torrents:
16+
17+ ```
18+ /opt/bin # ./add_trackers.sh
19+ Processing torrent #77...
20+ Adding trackers for torrent name...
21+ * http://www.opentrackr.org/announce... failed.
22+ * http://mgtracker.org:2710/announce... failed.
23+ Processing torrent #94...
24+ adding trackers for torrent name...
25+ * http://www.opentrackr.org/announce... done.
26+ * http://tracker.bittorrent.am/announce... done.
27+ * http://retracker.krs-ix.ru:80/announce... done.
28+ * http://mgtracker.org:2710/announce... done.
29+ * http://explodie.org:6969/announce... done.
30+ ```
31+
32+ Don't be confused with ` failed ` message. In most cases, it means tracker(s) already added and/or exists in current torrent.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Get transmission credentials
3+ auth=user:password
4+
5+ add_trackers () {
6+ torrent_hash=$1
7+ for base_url in https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt https://hastebin.com/raw/bererufibu ; do
8+ echo -e " \e[1m\e[5m"
9+ echo " URL for ${base_url} "
10+ echo -e " Adding trackers for \e[91m$torrent_name ..."
11+ echo -en " \e[0m"
12+ echo -e " \e[2m\e[92m"
13+ for tracker in $( curl -# " ${base_url} " ) ; do
14+ echo -en " \e[0m"
15+ echo -ne " \e[93m*\e[0m ${tracker} ..."
16+ if transmission-remote --auth=" $auth " --torrent " ${torrent_hash} " -td " ${tracker} " | grep -q ' success' ; then
17+ echo -e ' \e[91m failed.'
18+ echo -en " \e[0m"
19+ else
20+ echo -e ' \e[92m done.'
21+ echo -en " \e[0m"
22+ fi
23+ done
24+ done
25+ }
26+
27+ # Get list of active torrents
28+ ids=" $( transmission-remote --auth=" $auth " --list | grep -vE ' Seeding|Stopped|Finished' | grep ' ^ ' | awk ' { print $1 }' ) "
29+
30+ for id in $ids ; do
31+ hash=" $( transmission-remote --auth=" $auth " --torrent " $id " --info | grep ' ^ Hash: ' | awk ' { print $2 }' ) "
32+ torrent_name=" $( transmission-remote --auth=" $auth " --torrent " $id " --info | grep ' ^ Name: ' | cut -c 9-) "
33+ add_trackers " $hash "
34+ done
You can’t perform that action at this time.
0 commit comments