Merge branch 'main' of ssh://gitlab.jafner.net:2229/Jafner/homelab
This commit is contained in:
commit
519362be53
14
homelab/server/scripts/remove_trumped_torrents.py
Executable file
14
homelab/server/scripts/remove_trumped_torrents.py
Executable file
@ -0,0 +1,14 @@
|
||||
host = input("Enter host (e.g. 'localhost:8080'): ")
|
||||
username = input("Enter username: ")
|
||||
password = input("Enter password: ")
|
||||
|
||||
from qbittorrentapi import Client
|
||||
client = Client(host=host, username=username, password=password)
|
||||
|
||||
torrent_list = client.torrents.info()
|
||||
|
||||
for torrent in torrent_list:
|
||||
for status in torrent.trackers:
|
||||
if 'Unregistered torrent' in status.msg:
|
||||
print(torrent.name,' ',status.msg)
|
||||
torrent.delete(hash=(torrent.hash),delete_files=True)
|
Loading…
Reference in New Issue
Block a user