diff options
Diffstat (limited to 'scripts/ask-tracker-for-more-peers.py')
-rwxr-xr-x | scripts/ask-tracker-for-more-peers.py | 21 |
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() |