From 50a37e5a70aebb79dab2ef7761ce6e4a9a3a7072 Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Thu, 19 Feb 2026 15:33:04 -0800 Subject: [PATCH] move acoustID mismatches to a ss_quarantine folder inside the 'download' folder with a .quarantined extension. --- web_server.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web_server.py b/web_server.py index a7039ae4..f9128494 100644 --- a/web_server.py +++ b/web_server.py @@ -4155,7 +4155,9 @@ def _find_completed_file_robust(download_dir, api_filename, transfer_dir=None): highest_similarity = 0.0 # Walk through the entire directory - for root, _, files in os.walk(search_dir): + for root, dirs, files in os.walk(search_dir): + # Skip quarantine folder — contains known-wrong files from AcoustID verification + dirs[:] = [d for d in dirs if d != 'ss_quarantine'] for file in files: # Direct match is the best case if os.path.basename(file) == target_basename: @@ -9147,7 +9149,7 @@ def _move_to_quarantine(file_path: str, context: dict, reason: str) -> str: # Get quarantine directory (inside download folder — always writable, even in Docker) download_dir = docker_resolve_path(config_manager.get('soulseek.download_path', './downloads')) - quarantine_dir = Path(download_dir) / "Quarantine" + quarantine_dir = Path(download_dir) / "ss_quarantine" quarantine_dir.mkdir(parents=True, exist_ok=True) # Create quarantine entry with timestamp @@ -9155,8 +9157,10 @@ def _move_to_quarantine(file_path: str, context: dict, reason: str) -> str: original_name = Path(file_path).stem file_ext = Path(file_path).suffix - # Build quarantine filename: TIMESTAMP_originalname.ext - quarantine_filename = f"{timestamp}_{original_name}{file_ext}" + # Build quarantine filename: TIMESTAMP_originalname.ext.quarantined + # The .quarantined extension prevents audio file searches and media servers + # from picking up known-wrong files sitting in the downloads folder. + quarantine_filename = f"{timestamp}_{original_name}{file_ext}.quarantined" quarantine_path = quarantine_dir / quarantine_filename # Move file to quarantine