From 55f0532f307c34d8eec0f6659c7b126a2cf0960d Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Sun, 12 Apr 2026 11:01:15 -0700 Subject: [PATCH] Fix M3U files created for non-playlist downloads Single track downloads from Search, album downloads, redownloads, and issue downloads were not in the M3U skip list, so auto-save M3U created playlist files for them. Expanded skip list to cover all non-playlist prefixes: enhanced_search_track_, issue_download_, library_redownload_, and redownload_. --- webui/static/script.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/webui/static/script.js b/webui/static/script.js index c317dee4..920bfe47 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -12121,9 +12121,13 @@ async function autoSavePlaylistM3U(playlistId) { const m3uContent = generateM3UContent(playlistId); if (!m3uContent) return; - // Skip M3U for albums — albums are already naturally grouped in media servers - const albumPrefixes = ['artist_album_', 'discover_album_', 'enhanced_search_album_', 'seasonal_album_', 'spotify_library_', 'beatport_release_', 'discover_cache_']; - if (albumPrefixes.some(p => playlistId.startsWith(p))) return; + // Skip M3U for non-playlist downloads — albums, singles, redownloads, etc. + const nonPlaylistPrefixes = [ + 'artist_album_', 'discover_album_', 'enhanced_search_album_', 'enhanced_search_track_', + 'seasonal_album_', 'spotify_library_', 'beatport_release_', 'discover_cache_', + 'issue_download_', 'library_redownload_', 'redownload_', + ]; + if (nonPlaylistPrefixes.some(p => playlistId.startsWith(p))) return; const playlistName = process.playlist?.name || process.playlistName || 'Playlist'; const artistName = process.artist?.name || '';