From 6e86bac6eb55b6e9ea61cfd2c7d1254a786d8a20 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Fri, 12 Jun 2026 16:35:11 -0700 Subject: [PATCH] M3U: skip the auto-save no-op when export is disabled (fixes ~30s analysis jam) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The download modal auto-saves an M3U on every render (save_to_disk, no force). When m3u_export.enabled is off it writes nothing — but only AFTER ~30s of per-track DB search + fuzzy matching, which it then discards; fired repeatedly during analysis it jammed the batch (0 tasks, user cancels). Bail out at the top of generate_playlist_m3u for exactly that case (save_to_disk and not force and not enabled). Manual 'Export as M3U' sends force=True and content-only requests send save_to_disk=False — both unaffected. Pre-existing bug, unrelated to the playlist-folder feature, but it was blocking the discovery->download flow. --- web_server.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web_server.py b/web_server.py index fd2fb80d..6963ee2c 100644 --- a/web_server.py +++ b/web_server.py @@ -2695,6 +2695,15 @@ def generate_playlist_m3u(): save_to_disk = data.get('save_to_disk', False) force = data.get('force', False) + # The download modal auto-saves an M3U (save_to_disk, no force) on every + # render. When M3U export is disabled it would do nothing anyway — but only + # AFTER ~30s of per-track DB search + fuzzy matching below, which it then + # throws away (and which, fired repeatedly, jams the analysis). Bail out + # immediately for that case. The manual "Export as M3U" sends force=True and + # is unaffected; a content-only request (save_to_disk False) also proceeds. + if save_to_disk and not force and not config_manager.get('m3u_export.enabled', False): + return jsonify({"success": True, "skipped": True, "reason": "m3u_export disabled"}) + raw_base = config_manager.get('m3u_export.entry_base_path', '') or '' entry_base_path = raw_base.rstrip('/\\')