Update to handle more tracker unregistered torrent messages
This commit is contained in:
parent
b1b26f0c9c
commit
cba60ccd04
@ -5,6 +5,8 @@ connection_info = dict(
|
|||||||
password = input("Enter password: "),
|
password = input("Enter password: "),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from hurry.filesize import size, si
|
||||||
|
|
||||||
import qbittorrentapi
|
import qbittorrentapi
|
||||||
client = qbittorrentapi.Client(**connection_info)
|
client = qbittorrentapi.Client(**connection_info)
|
||||||
|
|
||||||
@ -17,6 +19,6 @@ torrent_list = client.torrents.info()
|
|||||||
|
|
||||||
for torrent in torrent_list:
|
for torrent in torrent_list:
|
||||||
for status in torrent.trackers:
|
for status in torrent.trackers:
|
||||||
if 'Unregistered torrent' in status.msg:
|
if 'UNREGISTERED TORRENT' in status.msg.upper() or 'TORRENT NOT REGISTERED' in status.msg.upper():
|
||||||
print(torrent.name)
|
print(torrent.name, size(torrent.size, system=si))
|
||||||
torrent.delete(hash=(torrent.hash),delete_files=True)
|
torrent.delete(hash=(torrent.hash),delete_files=True)
|
Loading…
x
Reference in New Issue
Block a user