M3U: skip the auto-save no-op when export is disabled (fixes ~30s analysis jam)
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.
This commit is contained in:
parent
d160c486ec
commit
6e86bac6eb
1 changed files with 9 additions and 0 deletions
|
|
@ -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('/\\')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue