mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-06 20:05:57 +08:00
potential fix for unregistered torrents
This commit is contained in:
parent
cdea2a73d5
commit
c82475400e
1 changed files with 42 additions and 36 deletions
|
@ -423,6 +423,7 @@ class Qbt:
|
||||||
t_msg = self.torrentinfo[t_name]['msg']
|
t_msg = self.torrentinfo[t_name]['msg']
|
||||||
t_status = self.torrentinfo[t_name]['status']
|
t_status = self.torrentinfo[t_name]['status']
|
||||||
check_tags = util.get_list(torrent.tags)
|
check_tags = util.get_list(torrent.tags)
|
||||||
|
try:
|
||||||
for x in torrent.trackers:
|
for x in torrent.trackers:
|
||||||
if x.url.startswith('http'):
|
if x.url.startswith('http'):
|
||||||
tracker = self.config.get_tags([x.url])
|
tracker = self.config.get_tags([x.url])
|
||||||
|
@ -459,6 +460,11 @@ class Qbt:
|
||||||
if any(m in msg_up for m in unreg_msgs) and x.status == 4:
|
if any(m in msg_up for m in unreg_msgs) and x.status == 4:
|
||||||
del_unregistered()
|
del_unregistered()
|
||||||
break
|
break
|
||||||
|
except NotFound404Error:
|
||||||
|
continue
|
||||||
|
except Exception as e:
|
||||||
|
util.print_stacktrace()
|
||||||
|
logger.error(f"Unknown Error: {e}")
|
||||||
if del_tor >= 1 or del_tor_cont >= 1:
|
if del_tor >= 1 or del_tor_cont >= 1:
|
||||||
if del_tor >= 1: print_line(f"{'Did not delete' if dry_run else 'Deleted'} {del_tor} .torrent{'s' if del_tor > 1 else ''} but not content files.", loglevel)
|
if del_tor >= 1: print_line(f"{'Did not delete' if dry_run else 'Deleted'} {del_tor} .torrent{'s' if del_tor > 1 else ''} but not content files.", loglevel)
|
||||||
if del_tor_cont >= 1: print_line(f"{'Did not delete' if dry_run else 'Deleted'} {del_tor_cont} .torrent{'s' if del_tor_cont > 1 else ''} AND content files.", loglevel)
|
if del_tor_cont >= 1: print_line(f"{'Did not delete' if dry_run else 'Deleted'} {del_tor_cont} .torrent{'s' if del_tor_cont > 1 else ''} AND content files.", loglevel)
|
||||||
|
|
Loading…
Add table
Reference in a new issue