aboutsummaryrefslogtreecommitdiff
path: root/scripts/ask-tracker-for-more-peers.py
diff options
context:
space:
mode:
authorChristian Segundo2024-07-23 21:43:05 +0200
committerChristian Segundo2024-07-23 21:43:05 +0200
commit362af4e16d7cdfa1512a6f2f154f055907b4d900 (patch)
treef0e8817df1cad49bd466c60016cdd8b70913690c /scripts/ask-tracker-for-more-peers.py
parent076b6aefd5b17cccc34cc403b7b4f2ba4f093a57 (diff)
downloadtransmission-hacks-362af4e16d7cdfa1512a6f2f154f055907b4d900.tar.gz
add ci
Diffstat (limited to 'scripts/ask-tracker-for-more-peers.py')
-rwxr-xr-xscripts/ask-tracker-for-more-peers.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/scripts/ask-tracker-for-more-peers.py b/scripts/ask-tracker-for-more-peers.py
deleted file mode 100755
index 8b874f0..0000000
--- a/scripts/ask-tracker-for-more-peers.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python3
-import click
-from transmission_rpc import Client
-
-
-@click.command()
-@click.option('--port', default=9091)
-@click.option('--host', default="localhost")
-def main(host, port):
- """ Reannounces all torrents that have not received any peers. """
-
- c = Client(host=host, port=port)
- torrents = c.get_torrents()
- for torrent in torrents:
- if torrent.progress == 0 and torrent.downloading:
- print(f"Reannouncing {torrent.name}")
- c.reannounce_torrent(torrent.id)
-
-
-if __name__ == '__main__':
- main()