From 97a77de02f5cd00dc8a74b07873757170825e7f4 Mon Sep 17 00:00:00 2001 From: Audionut Date: Tue, 15 Oct 2024 11:01:54 +1000 Subject: [PATCH] Don't validate disc torrents that have top folder modified --- src/clients.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/clients.py b/src/clients.py index 1b97da004..374bab9c9 100644 --- a/src/clients.py +++ b/src/clients.py @@ -123,6 +123,10 @@ async def is_valid_torrent(self, meta, torrent_path, torrenthash, torrent_client # Reuse if disc and basename matches or --keep-folder was specified if meta.get('is_disc', None) is not None or (meta['keep_folder'] and meta['isdir']): + torrent_name = torrent.metainfo['info']['name'] + if meta['uuid'] != torrent_name: + console.print("Modified file structure, skipping hash") + valid = False torrent_filepath = os.path.commonpath(torrent.files) if os.path.basename(meta['path']) in torrent_filepath: valid = True