From 0e3587ab3b712f6a279de8045b6992f2f3349ddd Mon Sep 17 00:00:00 2001 From: bobokun Date: Fri, 28 Oct 2022 15:39:41 -0400 Subject: [PATCH] lint --- modules/config.py | 2 +- modules/qbittorrent.py | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/modules/config.py b/modules/config.py index 1c49d3b..348e0ea 100644 --- a/modules/config.py +++ b/modules/config.py @@ -291,7 +291,7 @@ class Config: tracker = {} tracker['tag'] = None tracker['max_ratio'] = None - tracker['min_seeding_time'] = None + tracker['min_seeding_time'] = None tracker['max_seeding_time'] = None tracker['limit_upload_speed'] = None tracker['notifiarr'] = None diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index fe26209..623f15b 100644 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -366,9 +366,8 @@ class Qbt: min_seeding_time = tracker["min_seeding_time"] # Deletes torrent with data if cleanup is set to true and meets the ratio/seeding requirements - if (nohardlinks[category]['cleanup'] and torrent.state_enum.is_paused and len(nohardlinks[category]) > 0 - and torrent.seeding_time > (min_seeding_time*60)): - tdel_dict[torrent.name] = torrent['content_path'].replace(root_dir, root_dir) + if (nohardlinks[category]['cleanup'] and torrent.state_enum.is_paused and len(nohardlinks[category]) > 0 and torrent.seeding_time > (min_seeding_time*60)): + tdel_dict[torrent.name] = torrent['content_path'].replace(root_dir, root_dir) # Checks to see if previous noHL tagged torrents now have hard links. if (not (util.nohardlink(torrent['content_path'].replace(root_dir, root_dir))) and ('noHL' in torrent.tags)): num_untag += 1 @@ -817,16 +816,6 @@ class Qbt: excluded_orphan_files = [file for file in orphaned_files for exclude_pattern in exclude_patterns if fnmatch(file, exclude_pattern.replace(remote_path, root_path))] orphaned_files = set(orphaned_files) - set(excluded_orphan_files) - # if self.config.trace_mode: - # logger.separator("Torrent Files", space=False, border=False, loglevel='DEBUG') - # logger.print_line("\n".join(torrent_files), 'DEBUG') - # logger.separator("Root Files", space=False, border=False, loglevel='DEBUG') - # logger.print_line("\n".join(root_files), 'DEBUG') - # logger.separator("Excluded Orphan Files", space=False, border=False, loglevel='DEBUG') - # logger.print_line("\n".join(excluded_orphan_files), 'DEBUG') - # logger.separator("Orphaned Files", space=False, border=False, loglevel='DEBUG') - # logger.print_line("\n".join(orphaned_files), 'DEBUG') - # logger.separator("Deleting Orphaned Files", space=False, border=False, loglevel='DEBUG') if orphaned_files: os.makedirs(orphaned_path, exist_ok=True)