- [Fixed] An errant for loop was causing unregistered torrents to take 6x as long to manage/delete. Now fixed.
This commit is contained in:
Visorask 2021-03-01 22:26:26 -06:00 committed by GitHub
parent 51de7d82d4
commit a073610c80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,19 +328,18 @@ def rem_unregistered():
rem_unr = 0
del_tor = 0
for torrent in torrent_list:
for status in torrent.trackers:
for x in torrent.trackers:
if x.url.startswith('http'):
t_url = trunc_val(x.url, '/')
n_info = (f'\n - Torrent Name: {torrent.name} '
f'\n - Status: {status.msg} '
f'\n - Status: {x.msg} '
f'\n - Tracker: {t_url} '
f'\n - Deleted .torrent but not content files.')
n_d_info = (f'\n - Torrent Name: {torrent.name} '
f'\n - Status: {status.msg} '
f'\n - Status: {x.msg} '
f'\n - Tracker: {t_url} '
f'\n - Deleted .torrent AND content files.')
if 'Unregistered torrent' in status.msg or 'Torrent is not found' in status.msg:
if 'Unregistered torrent' in x.msg or 'Torrent is not found' in x.msg:
if torrent.name in dupes:
if args.dry_run == 'dry_run':
logger.dryrun(n_info)