From d16aaab0aa5ad36ead5984cd80894aaeb31ad0a7 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Sun, 5 Apr 2026 22:05:29 -0700 Subject: [PATCH] Fix empty artist folder created at base level with custom path templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using templates like "albums/$albumartist/$album/$track - $title", post-processing created Transfer/ArtistName/ before computing the template path, leaving an empty folder. _build_final_path_for_track handles all directory creation based on the template — the premature makedirs was redundant and incorrect. --- web_server.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web_server.py b/web_server.py index a25ebbd5..f812f7a8 100644 --- a/web_server.py +++ b/web_server.py @@ -19877,12 +19877,7 @@ def _post_process_matched_download(context_key, context, file_path): print(f"\n🎯 EXPLICIT ALBUM DOWNLOAD - preserving Spotify album name: '{album_info.get('album_name', 'None')}'") print(f" Skipping smart grouping (not needed for explicit album downloads)\n") - # 1. Get transfer path and create artist directory - transfer_dir = docker_resolve_path(config_manager.get('soulseek.transfer_path', './Transfer')) - artist_name_sanitized = _sanitize_filename(spotify_artist["name"]) - artist_dir = os.path.join(transfer_dir, artist_name_sanitized) - os.makedirs(artist_dir, exist_ok=True) - + # 1. Get transfer path (directory creation handled by _build_final_path_for_track) file_ext = os.path.splitext(file_path)[1] context['_audio_quality'] = _get_audio_quality_string(file_path) if context['_audio_quality']: